lzzy12 / python-aria-mirror-bot Goto Github PK
View Code? Open in Web Editor NEWA telegram bot for all your mirror needs | OG Repo
Home Page: https://t.me/pythonmirrorsupport
License: GNU General Public License v3.0
A telegram bot for all your mirror needs | OG Repo
Home Page: https://t.me/pythonmirrorsupport
License: GNU General Public License v3.0
Just like /tarmirror if possible please implement /unzipmirror
Hey brother. First of all thanks for your hard work. The issue I am facing is the bot gets stuck on Metadata even when torrent that has seeds (Joker BluRay for now). I tried other few torrents too... Same issue. But its working for DDLs. What can I do to fix this? Also I couldn't cancel torrents using /cancelmirror as only the /mirror command is working for me.
please give list of blocked tracker if possible sir?
~/mirror-bot$ python3 generate_drive_token.py
Traceback (most recent call last):
File "generate_drive_token.py", line 3, in
from google_auth_oauthlib.flow import InstalledAppFlow
ModuleNotFoundError: No module named 'google_auth_oauthlib'
out386/aria-telegram-mirror-bot@71c74e1
This helps a alot when you're in a group and some user is not able to find a DDL/magnet links and you search for a link and initiate the the download for him/her as a reply to that user.
Followed all the steps, but its stuck on:
Downloading
[ ] 0.00% of 0.00 B at 0.00 B/s, ETA: -
PS- DOWNLOAD_DIR = "/home/username/mirror-bot/downloads" What directory I have to choose? I have setup a Team drive
Thanks in advance!
`Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 156, in _new_conn
conn = connection.create_connection(
File "/usr/local/lib/python3.8/site-packages/urllib3/util/connection.py", line 84, in create_connection
raise err
File "/usr/local/lib/python3.8/site-packages/urllib3/util/connection.py", line 74, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 665, in urlopen
httplib_response = self._make_request(
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 387, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/local/lib/python3.8/http/client.py", line 1230, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/local/lib/python3.8/http/client.py", line 1276, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.8/http/client.py", line 1225, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.8/http/client.py", line 1004, in _send_output
self.send(msg)
File "/usr/local/lib/python3.8/http/client.py", line 944, in send
self.connect()
File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 184, in connect
conn = self._new_conn()
File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 168, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f2b9ec73df0>: Failed to establish a new connection: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 719, in urlopen
retries = retries.increment(
File "/usr/local/lib/python3.8/site-packages/urllib3/util/retry.py", line 436, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=6800): Max retries exceeded with url: /jsonrpc (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f2b9ec73df0>: Failed to establish a new connection: [Errno 111] Connection refused'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.8/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/usr/src/app/bot/helper/mirror_utils/download_tools.py", line 21, in add_download
download = aria2.add_uris([link], {'dir': DOWNLOAD_DIR + str(self.__listener.uid)})
File "/usr/local/lib/python3.8/site-packages/aria2p/api.py", line 154, in add_uris
gid = self.client.add_uri(uris, client_options, position)
File "/usr/local/lib/python3.8/site-packages/aria2p/client.py", line 441, in add_uri
return self.call(self.ADD_URI, params=[uris, options, position])
File "/usr/local/lib/python3.8/site-packages/aria2p/client.py", line 224, in call
return self.res_or_raise(self.post(self.get_payload(method, params, msg_id=msg_id)))
File "/usr/local/lib/python3.8/site-packages/aria2p/client.py", line 321, in post
return requests.post(self.server, data=payload).json()
File "/usr/local/lib/python3.8/site-packages/requests/api.py", line 116, in post
return request('post', url, data=data, json=json, **kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=6800): Max retries exceeded with url: /jsonrpc (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f2b9ec73df0>: Failed to establish a new connection: [Errno 111] Connection refused'))`
Hey,
I would love to to know where vould i edit torrent trackers?
This information will be useful as we can cancel the download if the seeds are too low!!
https://ghostbin.co/paste/378r8
Im on dev branch
And rest bot or crash, or stuck on 0% of uploading and other upload can stuck like in maybe 40% and dont go more, eta stopped updating, but downloading is fine, only bot stop all uploads, no gdrive limit etc
2020-02-14T16:07:42.143708+00:00 app[worker.1]: IndexError: list index out of range
Error when deploying !
The bot is giving this error when uploading a file.
HttpError 400 when requesting https://www.googleapis.com/upload/drive/v3/files?alt=json&uploadType=resumable returned "Bad Request"
Although the file is getting uploaded!
Request to add ability to get links from dlc file
Reference: http://dcrypt.it/
Npm source : https://www.npmjs.com/package/decrypt-dlc
As the code base grows, we definitely need unit testing
Every user can stop others user download without permission
Where I can deploy it and how ?
Could there be a feature added such that one can choose maybe in the config file if they want to upload files via rclone or not. This is because sometimes uploads get stuck via normal upload most especially with very large files and there's no way of resuming the upload via a command so one has to restart the bot losing previously downloaded files.
But rclone uploads rarely fails as it keeps on retrying to upload after 1 fail.
I thought this might be a solution to failed uploads especially for large files.
However the upload works perfectly, the progress of the upload sometimes gets stuck.
Maybe add a direct link generator command which generates a direct download link which instantly downloads the file.
EG:-
/direct (file name or even a SR number)
Something like Pyload plugins to download files from various non-ddl sites.
Like many sites which doesn't provide direct links to download this will help in that situation.
Similar to #27
Can we have the bot upload the files to a specific directory, which we specify at the time of mirroring.
Like I have a parent directory ex: Mirrored Stuff and in that, I'd like to classify my mirrored stuff like Anime, Tv-Shows, Movies, etc in their respective directories.
So when mirroring/cloning (if it's possible) can we specify something like:
/mirror (magnet/link) dir=(dir name or id)
It'd be really great and would save a lot of time.
Hello, i have question, as i know development branch is "development" and unstable, but what about 3.0 branch? Is it also, development? Or its "stable enough"?
I am on android and for some fucking reason getting this error code :
Traceback (most recent call last):
File "generate_drive_token.py", line 16, in
flow = InstalledAppFlow.from_client_secrets_file(
File "/data/data/com.termux/files/usr/lib/python3.8/site-packages/google_auth_oauthlib/flow.py", line 180, in from_client_secrets_file
with open(client_secrets_file, 'r') as json_file:
FileNotFoundError: [Errno 2] No such file or directory: 'credentials.json'
$
so my suggestion is to add deploy to heroku button please do it! and then this bot will be much easier to make/deploy
So while i try to download youtube videos..its getting downloaded a video quality of 360p
is there any way or flags to change my quality to highest
After you guys added YT-DL, mirroring with torrent files has not been possible.
It uploads back the same torrent file.😨
Check logs below.
2020-03-28T16:50:39.136684+00:00 app[worker.1]: 2020-03-28 16:50:39,135 - bot - INFO -
2020-03-28T16:50:39.961262+00:00 app[worker.1]: [generic] file_111: Requesting header
2020-03-28T16:50:40.367172+00:00 app[worker.1]: WARNING: Falling back on generic information extractor.
2020-03-28T16:50:40.368240+00:00 app[worker.1]: [generic] file_111: Downloading webpage
2020-03-28T16:50:40.692400+00:00 app[worker.1]: WARNING: URL could be a direct video link, returning it as such.
2020-03-28T16:50:40.713767+00:00 app[worker.1]: 2020-03-28 16:50:40,713 - bot - INFO - Downloading with YT-DL: https://api.telegram.org/file/botxxxxxxxxxxxxxxxxxxxxxx/documents/file_111.torrent
2020-03-28T16:50:40.730619+00:00 app[worker.1]: [generic] file_111: Requesting header
2020-03-28T16:50:40.979488+00:00 app[worker.1]: WARNING: Falling back on generic information extractor.
2020-03-28T16:50:40.979807+00:00 app[worker.1]: [generic] file_111: Downloading webpage
2020-03-28T16:50:41.303052+00:00 app[worker.1]: WARNING: URL could be a direct video link, returning it as such.
2020-03-28T16:50:41.716273+00:00 app[worker.1]: [download] Destination: /app/temp/1256/file_111.torrent
2020-03-28T16:50:41.954258+00:00 app[worker.1]:
2020-03-28T16:50:41.954260+00:00 app[worker.1]: 2020-03-28 16:50:41,953 - bot - INFO - Download completed: file_111.torrent
2020-03-28T16:50:41.954260+00:00 app[worker.1]: 2020-03-28 16:50:41,954 - bot - INFO - Upload Name : file_111.torrent
is this repo supports googls shared drives uploading?
Google drive works great but it would be great if it's possible to upload on onedrive too.
When I ran python3 generate_drive_token.py
I got these in return -
Traceback (most recent call last):
File "generate_drive_token.py", line 17, in
'credentials.json', __OAUTH_SCOPE)
File "/usr/local/lib/python3.6/dist-packages/google_auth_oauthlib/flow.py", line 197, in from_client_secrets_file
client_config = json.load(json_file)
File "/usr/lib/python3.6/json/init.py", line 299, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/lib/python3.6/json/init.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 7 column 1 (char 6)
Here the Log
It will be handy to have option to mirror telegram files too.
Feature Request add DRIVE_FILE_PRIVATE , i see commit from this Add option to make uploads private
Log: https://del.dog/illynginyf.txt
It shouldn't crash, rather it should send a message "Failed to start the download. Invalid URL/Magnet." or something like that.
Bot Stucks after Uploading Complete and does not giving link message !
Can you make download status in line it looks best 👌 inline @lzzy12
we cant push to heroku without heroku.yml ? i know its simple steps.but it will be hard for noobs.
When I run python3 -m bot
I get this error.
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 183, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/usr/lib/python3.6/runpy.py", line 142, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/usr/lib/python3.6/runpy.py", line 109, in _get_module_details
import(pkg_name)
File "/home/ubuntu/mirror-bot/bot/init.py", line 3, in
import aria2p
ModuleNotFoundError: No module named 'aria2p'
Deployed the bot on my Ubuntu system as per the notes.
Now when I send any file to bot it downloads the file but it does not upload anything.
As Google drive has a 750Gb/day/acc limit it will be helpful to provide information about amount of data uploaded on each day with stats command
I got the error after update requirements dot txt
Log : https://del.dog/mocyrfirfi.txt
`
bot - INFO - Adding link: filelink
bot - INFO - Download completed: README.md
bot - INFO - Upload Name : README.md
bot.helper.ext_utils.bot_utils - INFO - Google Drive token already valid!
bot.helper.ext_utils.bot_utils - INFO - Uploading File: README.md
bot.helper.ext_utils.bot_utils - INFO - status: None
bot.helper.ext_utils.bot_utils - ERROR - <HttpError 404 when requesting https://www.googleapis.com/upload/drive/v3/files?alt=json&uploadType=resumable returned "File not found: 0ALrxNBX8bGUk9PVA.">
bot - ERROR - HttpError 404 when requesting https://www.googleapis.com/upload/drive/v3/files?alt=json&uploadType=resumable returned "File not found: 0ALrxBX8bGUk9PVA."
bot - INFO - Cleaning download: /bot/downloads/102
`
能否加上gclone上传的方式呢?这样就不用担心上传750G的限制了
https://github.com/donwa/gclone
Cancel torrents automaticly if stuck on metadata in certain time to avoid filling the queue
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.