Giter VIP home page Giter VIP logo

blackpearl-bbcode-bot's Introduction

blackpearl-bbcode-bot

Simple Telegram Bot for generating BlackPearl BBCode Templates Written in Pyrogram

Features

-๐ŸŽ‰ IMDB Info fetching from files

-๐Ÿ—ƒ๏ธ Both Movies and TV Supported

-โš™๏ธ Mediainfo,Tags,Links,Size,Languages

-๐Ÿ› ๏ธ TMDB Posters For Movies

-๐Ÿ“ฆ Everything Works on Mounted Gdrive, No local files needed

-๐Ÿค˜ Fetches Every files in folder

To-do

  • Changing Entire Script to Make Advanced Stuffs,Takes time...

Installation

Requirements

Install the following dependencies in the listed order. Ensure Everything is added to the environment path.

  1. [python], 3.6.0 or newer
  2. [rclone], rclone.exe and rclone.config in same path or needed to be added in environment path
  3. [mediainfo], mediainfo.exe same path or environment

Steps

  • Edit BOTCONFIG.py Add Your Credentials And Paths

  • Install Requirements : python -m pip install -r requirements.txt

  • Add Needed Files to Path : rclone.exe - mediainfo.exe - rclone.config

  • Mount Your Drive using rclone : rclone mount remote:foldername --vfs-cache-mode full s:

    Note : Make Sure U mounted the remote:folder mentioned in config file, You can change s: to your mounted drive name (not rclone name)

  • Run Bot python BPBBCODE.py

  • Open Telegram Send /movie Foldername or /tv foldername

Working

  • Suppose your full path is : TEAM DRIVE/BOT/MOVIES/DUNE.2021.mkv BOT is your remote folder (folder u configured remote or root folder) And Your Remote name is : Arthur And If you want to fetch bbcode -
    • Mount Arthur:BOT
    • And You need to write : Arthur:BOT/ in BOTCONFIG.py : REMOTE_NAME = "Arthur:BOT/"
    • And When You use command in bot Use : /movie MOVIES So it loops in S:/MOVIES/ for MKV/MP4/AVI files
    • If you Are Trying TVSHOW, You must add season folder in command folder That is : TEAM DRIVE/BOT/TVSHOWS/VIGIL.S01/Vigil.S01E01.mkv TEAM DRIVE/BOT/TVSHOWS/VIGIL.S01/Vigil.S01E02.mkv And You Request : /tv TVSHOWS so that it picks season folder link and size.It only picks First episode for mediainfo,Rest of the episodes got skipped for mediainfo.So Unless there is E01 its skips..

Issues

  • Working must be trickier for you,But if you have any issues just add, I will fix it..

blackpearl-bbcode-bot's People

Contributors

monkeydluffy7 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

blackpearl-bbcode-bot's Issues

Does it work on linux?

How do I bypass this step?

rclone.exe and rclone.config in same path

Can just put a file config path
I don't have files exe

handler_worker:ERROR:Expecting value: line 1 column 1 (char 0)

Traceback (most recent call last):
File "\AppData\Local\Programs\Python\Python310\lib\site-packages\pyrogram\dispatcher.py", line 217, in handler_worker
await handler.callback(self.client, *args)
File "\blackpearl-bbcode-bot-main\BPBBCODE.py", line 389, in BPMV Language = getLANG(MOVIE_PATH)
File "\blackpearl-bbcode-bot-main\BPBBCODE.py", line 232, in getLANG mediainfo = json.load(mediainfo_output.stdout)
File "\AppData\Local\Programs\Python\Python310\lib\json_init_.py", line 293, in load
return loads(fp.read(),
File "\AppData\Local\Programs\Python\Python310\lib\json_init_.py", line 346, in loads
return _default_decoder.decode(s)
File "\AppData\Local\Programs\Python\Python310\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "\AppData\Local\Programs\Python\Python310\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Error

tfidf_train=tfidf_vectorizer.fit_transform(x_train)


ValueError Traceback (most recent call last)
Input In [38], in <cell line: 1>()
----> 1 tfidf_train=tfidf_vectorizer.fit_transform(x_train)

File ~\AppData\Local\Programs\Python\Python310\lib\site-packages\sklearn\feature_extraction\text.py:2077, in TfidfVectorizer.fit_transform(self, raw_documents, y)
2058 """Learn vocabulary and idf, return document-term matrix.
2059
2060 This is equivalent to fit followed by transform, but more efficiently
(...)
2074 Tf-idf-weighted document-term matrix.
2075 """
2076 self._check_params()
-> 2077 X = super().fit_transform(raw_documents)
2078 self._tfidf.fit(X)
2079 # X is already a transformed view of raw_documents so
2080 # we set copy to False

File ~\AppData\Local\Programs\Python\Python310\lib\site-packages\sklearn\feature_extraction\text.py:1330, in CountVectorizer.fit_transform(self, raw_documents, y)
1322 warnings.warn(
1323 "Upper case characters found in"
1324 " vocabulary while 'lowercase'"
1325 " is True. These entries will not"
1326 " be matched with any documents"
1327 )
1328 break
-> 1330 vocabulary, X = self.count_vocab(raw_documents, self.fixed_vocabulary)
1332 if self.binary:
1333 X.data.fill(1)

File ~\AppData\Local\Programs\Python\Python310\lib\site-packages\sklearn\feature_extraction\text.py:1201, in CountVectorizer._count_vocab(self, raw_documents, fixed_vocab)
1199 for doc in raw_documents:
1200 feature_counter = {}
-> 1201 for feature in analyze(doc):
1202 try:
1203 feature_idx = vocabulary[feature]

File ~\AppData\Local\Programs\Python\Python310\lib\site-packages\sklearn\feature_extraction\text.py:108, in _analyze(doc, analyzer, tokenizer, ngrams, preprocessor, decoder, stop_words)
86 """Chain together an optional series of text processing steps to go from
87 a single document to ngrams, with or without tokenizing or preprocessing.
88
(...)
104 A sequence of tokens, possibly with pairs, triples, etc.
105 """
107 if decoder is not None:
--> 108 doc = decoder(doc)
109 if analyzer is not None:
110 doc = analyzer(doc)

File ~\AppData\Local\Programs\Python\Python310\lib\site-packages\sklearn\feature_extraction\text.py:226, in _VectorizerMixin.decode(self, doc)
223 doc = doc.decode(self.encoding, self.decode_error)
225 if doc is np.nan:
--> 226 raise ValueError(
227 "np.nan is an invalid document, expected byte or unicode string."
228 )
230 return doc

ValueError: np.nan is an invalid document, expected byte or unicode string.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.