Code Monkey home page Code Monkey logo

python-aria-mirror-bot's Issues

Stuck on MetaData

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.

rqst

please give list of blocked tracker if possible sir?

error

~/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'

Yotube and other direct downloads [Feature Request]

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!

Deploy succeeded but sending files to mirror causes the following

`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'))`

[Issue] Uploading problem

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

Error 400 when the file is uploading

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!

[Feature Request] Option to upload files to Google Drive using rclone

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.

This is not sending the files to Google Drive

I managed to host the bot on Heroku and it manages to download the files, it can also create the folders of each mirror but does not send the file to GDrive, just gets stopped at 0%...

[Feature Request] Specify directory for the bot to upload files in the same

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.

Is this stagning-3.0 stable enough?

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"?

Add a deploy to heroku button

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

[Issue] Problem with torrent-file mirroring.

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

Onedrive support

Google drive works great but it would be great if it's possible to upload on onedrive too.

JSONDecodeError

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)

why deleted heroku.yml ?

we cant push to heroku without heroku.yml ? i know its simple steps.but it will be hard for noobs.

No module named aria2p

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'

[Issue] Upload never starts.

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.

Error Httperror404

`
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
`

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.