Aria/qBittorrent Telegram mirror/leech bot

Overview

This Telegram Bot written in Python for mirroring files on the Internet to our Google Drive or Telegram. Based on python-aria-mirror-bot

Features:

  • qBittorrent
  • Leech
  • Size limiting for Torrent/Direct, Tar/Unzip, Mega and clone
  • Stop duplicates for all tasks except for qBittorrent and youtube-dl tasks
  • Tar/Unzip G-Drive link
  • Select files from Torrent before downloading using qbittorrent
  • Counting files/folders from Google Drive link
  • View Link button instead of direct download link
  • Status Pages for unlimited tasks
  • Clone status
  • Search in multiple Drive folder/TD
  • Recursive Search
  • Many bugs has been fixed

From Original and Other Repos

  • Mirror direct download links, Torrent, and Telegram files to Google Drive
  • Mirror Mega.nz links to Google Drive (If you have non-premium Mega account, it will limit download to 5GB per 6 hours)
  • Copy files from someone's Drive to your Drive (Using Autorclone)
  • Download/Upload progress, Speeds and ETAs
  • Mirror all Youtube-dl supported links
  • Docker support
  • Uploading to Team Drive
  • Index Link support
  • Service Account support
  • Delete files from Drive
  • Shortener support
  • Speedtest
  • Multiple Trackers support
  • Extracting tar.xz support
  • Shell and Executor
  • Sudo with or without Database
  • Custom Filename (Only for direct links, Telegram files and Youtube-dl. Not for Mega links and Torrents)
  • Extracting and downloading password protected index links. See these examples:

  • Extract these filetypes and uploads to Google Drive
ZIP, RAR, TAR, 7z, ISO, WIM, CAB, GZIP, BZIP2, 
APM, ARJ, CHM, CPIO, CramFS, DEB, DMG, FAT, 
HFS, LZH, LZMA, LZMA2, MBR, MSI, MSLZ, NSIS, 
NTFS, RPM, SquashFS, UDF, VHD, XAR, Z.
  • Direct links Supported:
letsupload.io, hxfile.co, anonfiles.com, bayfiles.com, antfiles,
fembed.com, fembed.net, femax20.com, layarkacaxxi.icu, fcdn.stream,
sbplay.org, naniplay.com, naniplay.nanime.in, naniplay.nanime.biz, sbembed.com,
streamtape.com, streamsb.net, feurl.com, pixeldrain.com, racaty.net,
1fichier.com, 1drv.ms (Only works for file not folder or business account),
uptobox.com (Uptobox account must be premium), solidfiles.com

How to deploy?

Deploying is pretty much straight forward and is divided into several steps as follows:

Installing requirements

  • Clone this repo:
git clone https://github.com/anasty17/mirror-leech-telegram-bot mirrorbot/ && cd mirrorbot
  • Install requirements For Debian based distros
sudo apt install python3

Install Docker by following the official Docker docs

OR

sudo snap install docker
  • For Arch and it's derivatives:
sudo pacman -S docker python
  • Install dependencies for running setup scripts:
pip3 install -r requirements-cli.txt

Generate Database

Click Here For More Details

1. Using ElephantSQL

  • Go to https://elephantsql.com and create account (skip this if you already have ElephantSQL account)
  • Hit Create New Instance
  • Follow the further instructions in the screen
  • Hit Select Region
  • Hit Review
  • Hit Create instance
  • Select your database name
  • Copy your database url, and fill to DATABASE_URL in config

2. Using Heroku PostgreSQL

Setting up config file

cp config_sample.env config.env
  • Remove the first line saying:
_____REMOVE_THIS_LINE_____=True

Fill up rest of the fields. Meaning of each field is discussed below:

Required Field

  • BOT_TOKEN: The Telegram Bot Token that you got from @BotFather
  • TELEGRAM_API: This is to authenticate your Telegram account for downloading Telegram files. You can get this from https://my.telegram.org. NOTE: DO NOT put this in quotes.
  • TELEGRAM_HASH: This is to authenticate your Telegram account for downloading Telegram files. You can get this from https://my.telegram.org
  • OWNER_ID: The Telegram User ID (not username) of the Owner of the bot
  • GDRIVE_FOLDER_ID: This is the folder ID of the Google Drive Folder to which you want to upload all the mirrors.
  • DOWNLOAD_DIR: The path to the local folder where the downloads should be downloaded to
  • DOWNLOAD_STATUS_UPDATE_INTERVAL: A short interval of time in seconds after which the Mirror progress/status message is updated. (I recommend to keep it to 5 seconds at least)
  • AUTO_DELETE_MESSAGE_DURATION: Interval of time (in seconds), after which the bot deletes it's message (and command message) which is expected to be viewed instantly. (NOTE: Set to -1 to never automatically delete messages)

Optional Field

  • ACCOUNTS_ZIP_URL: Only if you want to load your Service Account externally from an Index Link. Archive the accounts folder to a zip file. Fill this with the direct link of that file.
  • TOKEN_PICKLE_URL: Only if you want to load your token.pickle externally from an Index Link. Fill this with the direct link of that file.
  • MULTI_SEARCH_URL: To use search/list in multiple TD/folder. Run driveid.py in your terminal and follow it. It will generate a file drive_folder when you finish. Upload that file here with the same file name. Open the raw file of that gist, it's URL will be your required config. Check wiki for gist related help.
  • DATABASE_URL: Your Database URL. See Generate Database to generate database (NOTE: If you use database you can save your Sudo ID permanently using /addsudo command).
  • AUTHORIZED_CHATS: Fill user_id and chat_id (not username) of groups/users you want to authorize. Separate them with space, Examples: -0123456789 -1122334455 6915401739.
  • SUDO_USERS: Fill user_id (not username) of users whom you want to give sudo permission. Separate them with space, Examples: 0123456789 1122334455 6915401739 (NOTE: If you want to save Sudo ID permanently without database, you must fill your Sudo Id here).
  • IS_TEAM_DRIVE: Set to True if GDRIVE_FOLDER_ID is from a Team Drive else False or Leave it empty.
  • USE_SERVICE_ACCOUNTS: (Leave empty if unsure) Whether to use Service Accounts or not. For this to work see Using Service Accounts section below.
  • INDEX_URL: Refer to https://gitlab.com/ParveenBhadooOfficial/Google-Drive-Index The URL should not have any trailing '/'
  • MEGA_API_KEY: Mega.nz API key to mirror mega.nz links. Get it from Mega SDK Page
  • MEGA_EMAIL_ID: Your E-Mail ID used to sign up on mega.nz for using premium account (Leave though)
  • MEGA_PASSWORD: Your Password for your mega.nz account
  • BLOCK_MEGA_FOLDER: If you want to remove mega.nz folder support, set it to True.
  • BLOCK_MEGA_LINKS: If you want to remove mega.nz mirror support, set it to True.
  • STOP_DUPLICATE: (Leave empty if unsure) if this field is set to True, bot will check file in Drive, if it is present in Drive, downloading or cloning will be stopped. (NOTE: File will be checked using filename, not using filehash, so this feature is not perfect yet)
  • CLONE_LIMIT: To limit the size of Google Drive folder/file which you can clone (leave space between number and unit, Available units are (gb or GB, tb or TB), Examples: 100 gb, 100 GB, 10 tb, 10 TB
  • MEGA_LIMIT: To limit the size of Mega download (leave space between number and unit, available units are (gb or GB, tb or TB), Examples: 100 gb, 100 GB, 10 tb, 10 TB
  • TORRENT_DIRECT_LIMIT: To limit the Torrent/Direct mirror size, leave space between number and unit. Available units are (gb or GB, tb or TB), Examples: 100 gb, 100 GB, 10 tb, 10 TB
  • TAR_UNZIP_LIMIT: To limit the size of mirroring as Tar or unzipmirror. Available units are (gb or GB, tb or TB), Examples: 100 gb, 100 GB, 10 tb, 10 TB
  • VIEW_LINK: View Link button to open file Index Link in browser instead of direct download link, you can figure out if it's compatible with your Index code or not, open any video from you Index and check if its URL ends with ?a=view, if yes make it True it will work (Compatible with https://gitlab.com/ParveenBhadooOfficial/Google-Drive-Index Code)
  • UPTOBOX_TOKEN: Uptobox token to mirror uptobox links. Get it from Uptobox Premium Account.
  • IGNORE_PENDING_REQUESTS: If you want the bot to ignore pending requests after it restarts, set this to True.
  • STATUS_LIMIT: Limit the no. of tasks shown in status message with button. (NOTE: Recommended limit is 4 tasks at max).
  • IS_VPS: (Only for VPS) Don't set this to True even if you are using VPS, unless facing error with web server.
  • SERVER_PORT: Only For VPS even if IS_VPS is False --> Base URL Port
  • BASE_URL_OF_BOT: (Required for Heroku to avoid sleep/idling) Valid BASE URL of app where the bot is deployed. Format of URL should be http://myip (where myip is the IP/Domain of your bot) or if you have chosen other port than 80 then fill in this format http://myip:port, for Heroku fill https://yourappname.herokuapp.com (NOTE: Do not put slash at the end), still got idling? You can use http://cron-job.org to ping your Heroku app.
  • RECURSIVE_SEARCH: Set this to True to search in sub-folders with /list (NOTE: This will only work with Shared-Drive ID or fill root for main Drive. Folder IDs are not compatible with it.)
  • TG_SPLIT_SIZE: Size Telegram split, leave it empty for max size 2GB
  • AS_DOCUMENT: Should all the upload to Telegram be forced as documents or not, set it True or False
  • SHORTENER_API: Fill your Shortener API key if you are using Shortener.
  • SHORTENER: if you want to use Shortener in G-Drive and index link, fill Shortener URL here. Examples:
exe.io, gplinks.in, shrinkme.io, urlshortx.com, shortzon.com, bit.ly,
shorte.st, linkvertise.com , ouo.io

Above are the supported URL Shorteners. Except these only some URL Shorteners are supported.

Add more buttons (Optional Field)

Three buttons are already added including Drive Link, Index Link, and View Link, you can add extra buttons, if you don't know what are the below entries, simply leave them empty.

  • BUTTON_FOUR_NAME:
  • BUTTON_FOUR_URL:
  • BUTTON_FIVE_NAME:
  • BUTTON_FIVE_URL:
  • BUTTON_SIX_NAME:
  • BUTTON_SIX_URL:

Bot commands to be set in @BotFather

mirror - Start Mirroring
tarmirror - Start mirroring and upload as .tar
zipmirror - Start mirroring and upload as .zip
unzipmirror - Extract files
qbmirror - Start Mirroring using qBittorrent
qbtarmirror - Start mirroring and upload as .tar using qb
qbzipmirror - Start mirroring and upload as .zip using qb
qbunzipmirror - Extract files using qBittorrent
leech - Leech Torrent/Direct link
tarleech - Leech Torrent/Direct link and upload as .tar
zipleech - Leech Torrent/Direct link and upload as .zip
unzipleech - Leech Torrent/Direct link and extract
qbleech - Leech Torrent/Magnet using qBittorrent
qbtarleech - Leech Torrent/Magnet and upload as .tar using qb
qbzipleech - Leech Torrent/Magnet and upload as .zip using qb
qbunzipleech - Leech Torrent and extract using qb
clone - Copy file/folder to Drive count - Count file/folder of Drive link
watch - Mirror Youtube-dl supported link
tarwatch - Mirror Youtube playlist link and upload as .tar
zipwatch - Mirror Youtube playlist link and upload as .zip
leechwatch - Leech through Youtube-dl supported link
leechtarwatch - Leech Youtube playlist link and upload as .tar
leechzipwatch - Leech Youtube playlist link and upload as .zip
leechset - Leech settings
setthumb - Set Thumbnail
status - Get Mirror Status message
list - [query] Searches files in Drive
cancel - Cancel a task
cancelall - Cancel all tasks
del - [drive_url] Delete file from Drive
log - Get the Bot Log [owner/sudo only]
shell - Run commands in Shell [owner only]
restart - Restart the Bot [owner/sudo only]
stats - Bot Usage Stats
ping - Ping the Bot

Getting Google OAuth API credential file

  • Visit the Google Cloud Console
  • Go to the OAuth Consent tab, fill it, and save.
  • Go to the Credentials tab and click Create Credentials -> OAuth Client ID
  • Choose Desktop and Create.
  • Use the download button to download your credentials.
  • Move that file to the root of mirrorbot, and rename it to credentials.json
  • Visit Google API page
  • Search for Drive and enable it if it is disabled
  • Finally, run the script to generate token.pickle file for Google Drive:
pip install google-api-python-client google-auth-httplib2 google-auth-oauthlib
python3 generate_drive_token.py

Deploying On VPS

IMPORTANT NOTE: You must set SERVER_PORT variable to 80 or any other port you want to use.

  • Start Docker daemon (skip if already running):
sudo dockerd
  • Build Docker image:
sudo docker build . -t mirror-bot
  • Run the image:
sudo docker run -p 80:80 mirror-bot

OR

Using Docker-compose, you can edit and build your image in seconds:

NOTE: If you want to use port other than 80, change it in docker-compose.yml

sudo apt install docker-compose
  • Build and run Docker image:
sudo docker-compose up
  • After editing files with nano for example (nano start.sh):
sudo docker-compose build
sudo docker-compose up

OR

sudo docker-compose up --build
  • To stop Docker:
sudo docker ps
sudo docker stop id
  • To clear the container (this will not affect the image):
sudo docker container prune
  • To delete the image:
sudo docker image prune -a
  • Tutorial video from Tortoolkit repo

Deploying on Heroku

  • Deploying on Heroku with Github Workflow

  • Deploying on Heroku with heroku-cli and Goorm IDE

Using Service Accounts for uploading to avoid user rate limit

For Service Account to work, you must set USE_SERVICE_ACCOUNTS = "True" in config file or environment variables. NOTE: Using Service Accounts is only recommended while uploading to a Team Drive.

Generate Service Accounts. What is Service Account

Let us create only the Service Accounts that we need. Warning: Abuse of this feature is not the aim of this project and we do NOT recommend that you make a lot of projects, just one project and 100 SAs allow you plenty of use, its also possible that over abuse might get your projects banned by Google.

NOTE: If you have created SAs in past from this script, you can also just re download the keys by running:

python3 gen_sa_accounts.py --download-keys project_id

NOTE: 1 Service Account can copy around 750 GB a day, 1 project can make 100 Service Accounts so you can upload 75 TB a day and clone 2 TB from each file creator (uploader email).

NOTE: Add Service Accounts to team drive or google group no need to add them in both.

Create Service Accounts to current project (Manual Method)

  • List your projects ids
python3 gen_sa_accounts.py --list-projects
  • Enable services automatically by this command
python3 gen_sa_accounts.py --enable-services $PROJECTID
  • Create Sevice Accounts to current project
python3 gen_sa_accounts.py --create-sas $PROJECTID
  • Download Sevice Accounts as accounts folder
python3 gen_sa_accounts.py --download-keys $PROJECTID

Another Quick Method

python3 gen_sa_accounts.py --quick-setup 1 --new-only

A folder named accounts will be created which will contain keys for the Service Accounts.

Add Service Accounts to Google Group

  • Mount accounts folder
cd accounts
  • Grab emails form all accounts to emails.txt file that would be created in accounts folder
grep -oPh '"client_email": "\K[^"]+' *.json > emails.txt
  • Unmount acounts folder
cd -

Then add emails from emails.txt to Google Group, after that add this Google Group to your Shared Drive and promote it to manager.

Add Service Accounts to the Team Drive

  • Run:
python3 add_to_team_drive.py -d SharedTeamDriveSrcID

Youtube-dl and index authentication using .netrc file

For using your premium accounts in Youtube-dl or for protected Index Links, edit the netrc file according to following format:

machine host login username password my_youtube_password

For Index Link with only password without username, even http auth will not work, so this is the solution.

machine example.workers.dev password index_password

Where host is the name of extractor (eg. Youtube, Twitch). Multiple accounts of different hosts can be added each separated by a new line.

Comments
  • HttpError 403

    HttpError 403

    I tried to upload a file and it is uploaded, but getting this error.

    HttpError 403 when requesting https://www.googleapis.com/drive/v3/files/1ihmHyI0kAv2VD3HUIo6n5qqH3BiR5suZ/permissions?supportsTeamDrives=true&alt=json returned "The user does not have sufficient permissions for this file.". Details: "[{'domain': 'global', 'reason': 'insufficientFilePermissions', 'message': 'The user does not have sufficient permissions for this file.'}]">

    opened by X-Gorn 17
  • Torrents getting stopped after selection

    Torrents getting stopped after selection

    So i have been having this problem after some commit i don't what commit actually caused this. But the torrents get cancelled or stopped as soon as the bot upload the files. Note that this happens only when i use the "select" feature when i want only some files from a specific torrent because the size is so big like 1TB.

    So i select the files and the bot starts leeching then upload it. And as soon as the bot upload it and start to seed it i get the following message : "your download has been stopped due to: No enough space for this torrent on device"

    And it happens even when i select only 5GB of files from the torrent.

    The bot logs : 2022-09-11T16:15:31.615004+00:00 app[web.1]: 2022-09-11 16:15:31,614 - bot.helper.mirror_utils.upload_utils.gdriveTools - INFO - Uploaded To G-Drive: Star Trek: Voyager 1995 48xDVD9 2022-09-11T16:15:31.615149+00:00 app[web.1]: 2022-09-11 16:15:31,615 - bot - INFO - Done Uploading Star Trek: Voyager 1995 48xDVD9 2022-09-11T16:15:31.840247+00:00 app[web.1]: 2022-09-11 16:15:31,840 - bot - INFO - Seeding started: Star Trek: Voyager 1995 48xDVD9 - Hash: 5038cb10c8ff6fb8d46a751510890f0778ef4c88 2022-09-11T16:15:31.842896+00:00 app[web.1]: 2022-09-11 16:15:31,842 - bot - INFO - Cancelling Download: Star Trek: Voyager 1995 48xDVD9 2022-09-11T16:15:32.145303+00:00 app[web.1]: 2022-09-11 16:15:32,145 - bot - INFO - Cleaning Download: /usr/src/app/downloads/2204

    Can you please look into this?

    Bug 
    opened by Nobody12541 16
  • ModuleNotFoundError: No module named 'bencoding'

    ModuleNotFoundError: No module named 'bencoding'

    Application Logs 2022-02-09T04:33:44.845701+00:00 app[web.1]: File "/usr/src/app/bot/main.py", line 22, in 2022-02-09T04:33:44.845702+00:00 app[web.1]: from .modules import authorize, list, cancel_mirror, mirror_status, mirror, clone, watch, shell, eval, delete, speedtest, count, leech_settings, search, rss 2022-02-09T04:33:44.845702+00:00 app[web.1]: File "/usr/src/app/bot/modules/mirror.py", line 24, in 2022-02-09T04:33:44.845704+00:00 app[web.1]: from bot.helper.mirror_utils.download_utils.qbit_downloader import add_qb_torrent 2022-02-09T04:33:44.845704+00:00 app[web.1]: File "/usr/src/app/bot/helper/mirror_utils/download_utils/qbit_downloader.py", line 2, in 2022-02-09T04:33:44.845705+00:00 app[web.1]: from bencoding import bencode, bdecode 2022-02-09T04:33:44.845705+00:00 app[web.1]: ModuleNotFoundError: No module named 'bencoding' 2022-02-09T04:33:45.098656+00:00 app[web.1]: [2022-02-09 04:33:45 +0000] [31] [ERROR] Connection in use: ('0.0.0.0', 51062) 2022-02-09T04:33:45.098690+00:00 app[web.1]: [2022-02-09 04:33:45 +0000] [31] [ERROR] Retrying in 1 second. 2022-02-09T04:33:46.099961+00:00 app[web.1]: [2022-02-09 04:33:46 +0000] [31] [ERROR] Can't connect to ('0.0.0.0', 51062) 2022-02-09T04:34:36.854811+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch 2022-02-09T04:34:36.886478+00:00 heroku[web.1]: Stopping process with SIGKILL 2022-02-09T04:34:37.139753+00:00 heroku[web.1]: State changed from starting to crashed 2022-02-09T04:34:37.151106+00:00 heroku[web.1]: State changed from crashed to starting 2022-02-09T04:34:37.024436+00:00 heroku[web.1]: Process exited with status 137 2022-02-09T04:34:55.866760+00:00 heroku[router]: at=error code=H20 desc="App boot timeout" method=GET path="/" host=bdmovie6999.herokuapp.com request_id=2b45336b-8dbf-4b4e-a088-cafcd4a8ec04 fwd="52.31.47.33" dyno= connect= service= status=503 bytes= protocol=https 2022-02-09T04:35:06.475222+00:00 app[web.1]: warning: no common commits 2022-02-09T04:35:05.207904+00:00 heroku[web.1]: Starting process with command bash start.sh 2022-02-09T04:35:08.102584+00:00 heroku[web.1]: State changed from starting to up 2022-02-09T04:35:07.934577+00:00 app[web.1]: [2022-02-09 04:35:07 +0000] [31] [INFO] Starting gunicorn 20.1.0 2022-02-09T04:35:07.934943+00:00 app[web.1]: [2022-02-09 04:35:07 +0000] [31] [INFO] Listening at: http://0.0.0.0:8847 (31) 2022-02-09T04:35:07.934995+00:00 app[web.1]: [2022-02-09 04:35:07 +0000] [31] [INFO] Using worker: aiohttp.GunicornWebWorker 2022-02-09T04:35:07.939214+00:00 app[web.1]: [2022-02-09 04:35:07 +0000] [60] [INFO] Booting worker with pid: 60 2022-02-09T04:35:08.798447+00:00 app[web.1]: 2022-02-09 04:35:08,798 - bot - INFO - Generating BOT_STRING_SESSION 2022-02-09T04:35:09.800422+00:00 app[web.1]: 2022-02-09 04:35:09,800 - root - INFO - Initializing Aria2c 2022-02-09T04:35:09.792679+00:00 heroku[router]: at=info method=GET path="/" host=bdmovie6999.herokuapp.com request_id=fe2dd82a-7fbc-461d-8a7c-0b9468d3afe2 fwd="3.250.45.0" dyno=web.1 connect=0ms service=1ms status=200 bytes=338 protocol=https 2022-02-09T04:35:11.671586+00:00 app[web.1]: 2022-02-09 04:35:11,671 - bot - INFO - Creating TELEGRAPH Account using 'Lmqtxepe' name 2022-02-09T04:35:11.881312+00:00 app[web.1]: Traceback (most recent call last): 2022-02-09T04:35:11.881316+00:00 app[web.1]: File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main 2022-02-09T04:35:11.881316+00:00 app[web.1]: return _run_code(code, main_globals, None, 2022-02-09T04:35:11.881316+00:00 app[web.1]: File "/usr/lib/python3.8/runpy.py", line 87, in _run_code 2022-02-09T04:35:11.881317+00:00 app[web.1]: exec(code, run_globals) 2022-02-09T04:35:11.881317+00:00 app[web.1]: File "/usr/src/app/bot/main.py", line 22, in 2022-02-09T04:35:11.881331+00:00 app[web.1]: from .modules import authorize, list, cancel_mirror, mirror_status, mirror, clone, watch, shell, eval, delete, speedtest, count, leech_settings, search, rss 2022-02-09T04:35:11.881331+00:00 app[web.1]: File "/usr/src/app/bot/modules/mirror.py", line 24, in 2022-02-09T04:35:11.881331+00:00 app[web.1]: from bot.helper.mirror_utils.download_utils.qbit_downloader import add_qb_torrent 2022-02-09T04:35:11.881332+00:00 app[web.1]: File "/usr/src/app/bot/helper/mirror_utils/download_utils/qbit_downloader.py", line 2, in 2022-02-09T04:35:11.881333+00:00 app[web.1]: from bencoding import bencode, bdecode 2022-02-09T04:35:11.881333+00:00 app[web.1]: ModuleNotFoundError: No module named 'bencoding'

    opened by FilmBee 16
  • Cloning Error

    Cloning Error

    Some clones show: Error:'utf-8' codec can't decode byte 0xff in position 0: invalid start byte image and sometimes it says that file/folder already exists, even tho it does not (works fine when STOP_DUPLICATE is false but then the utf-8 error show up), and sometimes the telegraph search result view button doesn't show up image

    opened by rajput-hemant 16
  • Heroku bash start.sh Issue

    Heroku bash start.sh Issue

    Logs

    2022-08-19T04:58:21.892474+00:00 heroku[web.1]: Starting process with command bash start.sh 2022-08-19T04:58:23.526029+00:00 app[web.1]: 2022-08-19 04:58:23,525 - root - INFO - Successfully updated with latest commit from UPSTREAM_REPO 2022-08-19T04:58:24.671967+00:00 app[web.1]: Traceback (most recent call last): 2022-08-19T04:58:24.671990+00:00 app[web.1]: File "/usr/lib/python3.10/runpy.py", line 187, in _run_module_as_main 2022-08-19T04:58:24.672114+00:00 app[web.1]: mod_name, mod_spec, code = _get_module_details(mod_name, _Error) 2022-08-19T04:58:24.672123+00:00 app[web.1]: File "/usr/lib/python3.10/runpy.py", line 146, in _get_module_details 2022-08-19T04:58:24.672234+00:00 app[web.1]: return _get_module_details(pkg_main_name, error) 2022-08-19T04:58:24.672237+00:00 app[web.1]: File "/usr/lib/python3.10/runpy.py", line 110, in _get_module_details 2022-08-19T04:58:24.672368+00:00 app[web.1]: import(pkg_name) 2022-08-19T04:58:24.672401+00:00 app[web.1]: File "/usr/src/app/bot/init.py", line 63, in 2022-08-19T04:58:24.672516+00:00 app[web.1]: srun(["firefox", "-d", "--profile=."]) 2022-08-19T04:58:24.672533+00:00 app[web.1]: File "/usr/lib/python3.10/subprocess.py", line 501, in run 2022-08-19T04:58:24.672701+00:00 app[web.1]: with Popen(*popenargs, **kwargs) as process: 2022-08-19T04:58:24.672720+00:00 app[web.1]: File "/usr/lib/python3.10/subprocess.py", line 966, in init 2022-08-19T04:58:24.672967+00:00 app[web.1]: self._execute_child(args, executable, preexec_fn, close_fds, 2022-08-19T04:58:24.672986+00:00 app[web.1]: File "/usr/lib/python3.10/subprocess.py", line 1842, in _execute_child 2022-08-19T04:58:24.673449+00:00 app[web.1]: raise child_exception_type(errno_num, err_msg, err_filename) 2022-08-19T04:58:24.673483+00:00 app[web.1]: FileNotFoundError: [Errno 2] No such file or directory: 'firefox' 2022-08-19T04:58:24.808090+00:00 app[web.1]: 2022-08-19 04:58:24,807 - asyncio - ERROR - Unclosed client session 2022-08-19T04:58:24.808092+00:00 app[web.1]: client_session: <aiohttp.client.ClientSession object at 0x7f8b700d46d0> 2022-08-19T04:58:24.882774+00:00 app[web.1]: [2022-08-19 04:58:24 +0000] [32] [INFO] Starting gunicorn 20.1.0 2022-08-19T04:58:24.883272+00:00 app[web.1]: [2022-08-19 04:58:24 +0000] [32] [INFO] Listening at: http://0.0.0.0:27678 (32) 2022-08-19T04:58:24.883356+00:00 app[web.1]: [2022-08-19 04:58:24 +0000] [32] [INFO] Using worker: sync 2022-08-19T04:58:24.889989+00:00 app[web.1]: [2022-08-19 04:58:24 +0000] [33] [INFO] Booting worker with pid: 33 2022-08-19T04:58:25.033632+00:00 heroku[web.1]: Process exited with status 1 2022-08-19T04:58:25.112496+00:00 heroku[web.1]: State changed from starting to crashed

    Bug 
    opened by telugucartoons1 13
  • ModuleNotFoundError: No module named 'asgiref'

    ModuleNotFoundError: No module named 'asgiref'

    2022-01-10T07:36:48.581196+00:00 app[web.1]: from asgiref.sync import async_to_sync 2022-01-10T07:36:48.581257+00:00 app[web.1]: ModuleNotFoundError: No module named 'asgiref'

    opened by FilmBee 13
  • Upload not working through SA's

    Upload not working through SA's

    Hi.. I deployed bot via github workflow and added both token.pickle accounts.zip url in config.env & set use service account to "True" also added Google group (with same sa) to td with manger permission but upload won't happening. Btw upload works fine if I'm not using sa's. And my sa are fine (not banned or anything) so what I'm doing wrong here... please slove this This is what log file shows: 2021-11-26 05:49:22,382 - bot - INFO - Generating USER_SESSION_STRING 2021-11-26 05:49:22,383 - root - WARNING - MEGA API KEY not provided! 2021-11-26 05:49:22,383 - root - WARNING - MEGA Credentials not provided! 2021-11-26 05:49:22,383 - root - WARNING - UPTOBOX_TOKEN not provided! 2021-11-26 05:49:26,743 - bot - INFO - Creating TELEGRAPH Account using 'duEFmSXa' name 2021-11-26 05:49:34,438 - apscheduler.scheduler - INFO - Scheduler started 2021-11-26 05:49:34,622 - bot - INFO - Bot Started! 2021-11-26 05:52:51,237 - bot - INFO - https://github.com/endeavouros-team/ISO/releases/download/1-EndeavourOS-ISO-releases-archive/endeavouros-2021.08.27-x86_64.iso 2021-11-26 05:52:51,328 - bot - INFO - Started: 05eb832921ab9b60 DIR:/usr/src/app/downloads/2448 2021-11-26 05:53:28,626 - bot - INFO - Download completed: endeavouros-2021.08.27-x86_64.iso 2021-11-26 05:53:28,635 - bot - INFO - Upload Name: endeavouros-2021.08.27-x86_64.iso 2021-11-26 05:53:28,636 - bot.helper.mirror_utils.upload_utils.gdriveTools - INFO - Authorizing with 97.json service account

    opened by lemoonnn 13
  • deploy through work flows, bot wasn't responding

    deploy through work flows, bot wasn't responding

    image kindda weird, I did't see any error, but after restart the bot from heroku dashboard like 5-6 times -> doesn't work. An advice would be appreciated (no suspend mail from heroku either)

    opened by testerBckup 13
  • Bro , what is this issue

    Bro , what is this issue

    Iam fetched and merged ur new committe after that bot crashed , log in below

    2022-08-26T07:54:20.895533+00:00 app[web.1]: with Popen(*popenargs, **kwargs) as process: 2022-08-26T07:54:20.895535+00:00 app[web.1]: File "/usr/lib/python3.10/subprocess.py", line 966, in init 2022-08-26T07:54:20.895707+00:00 app[web.1]: self._execute_child(args, executable, preexec_fn, close_fds, 2022-08-26T07:54:20.895708+00:00 app[web.1]: File "/usr/lib/python3.10/subprocess.py", line 1842, in _execute_child 2022-08-26T07:54:20.896085+00:00 app[web.1]: raise child_exception_type(errno_num, err_msg, err_filename) 2022-08-26T07:54:20.896108+00:00 app[web.1]: FileNotFoundError: [Errno 2] No such file or directory: 'firefox' 2022-08-26T07:54:20.970828+00:00 app[web.1]: 2022-08-26 07:54:20,970 - asyncio - ERROR - Unclosed client session 2022-08-26T07:54:20.970829+00:00 app[web.1]: client_session: <aiohttp.client.ClientSession object at 0x7f8256da07c0> 2022-08-26T07:54:21.162782+00:00 heroku[web.1]: Process exited with status 1 2022-08-26T07:54:21.217911+00:00 heroku[web.1]: State changed from starting to crashed

    invalid 
    opened by DreamCatcher96 12
  • Leech Failed with this Specified Torrent File only - Failed to establish a new connection: [Errno 111] Connection refused

    Leech Failed with this Specified Torrent File only - Failed to establish a new connection: [Errno 111] Connection refused

    Describe the bug error came only with specified torrent file, I had tried with old commit before Commits Aug 18, 2022. it's working. also with magnet link it's fine, no problem (link torrent post https://yts.mx/movies/frank-and-penelope-2022) , please kindly try with given link to compare.

    Additional context Fresh Deployment, Heroku Region EU, Latest Commit.

    To Reproduce Steps to reproduce the behavior:

    1. /ql https://yts.mx/torrent/download/58014ABD5F57CEC26B1EF3E7EE1DE9F77E9F32D5
    2. it will downloading, after some time it stuck and said Failed to establish a new connection: [Errno 111] Connection refused
    3. Check logs

    Bot Log

    2022-08-21 12:26:53,730 - root - INFO - Successfully updated with latest commit from UPSTREAM_REPO
    2022-08-21 12:26:59,089 - root - INFO - Creating client from BOT_TOKEN
    2022-08-21 12:26:59,107 - root - INFO - Initializing Aria2c
    2022-08-21 12:27:11,070 - apscheduler.scheduler - INFO - Scheduler started
    2022-08-21 12:27:11,122 - bot - INFO - Bot Started!
    2022-08-21 12:32:37,965 - bot - INFO - https://yts.mx/torrent/download/58014ABD5F57CEC26B1EF3E7EE1DE9F77E9F32D5
    2022-08-21 12:32:38,619 - bot - INFO - QbitDownload started: Frank And Penelope (2022) [720p] [WEBRip] [YTS.MX] - Hash: 58014abd5f57cec26b1ef3e7ee1de9f77e9f32d5
    2022-08-21 12:38:35,626 - urllib3.connectionpool - WARNING - Retrying (Retry(total=0, connect=0, read=1, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f5a38110400>: Failed to establish a new connection: [Errno 111] Connection refused')': /api/v2/torrents/info
    2022-08-21 12:38:35,631 - urllib3.connectionpool - WARNING - Retrying (Retry(total=0, connect=0, read=1, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f5a33f47cd0>: Failed to establish a new connection: [Errno 111] Connection refused')': /
    2022-08-21 12:38:35,639 - urllib3.connectionpool - WARNING - Retrying (Retry(total=0, connect=0, read=1, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f5a33f46890>: Failed to establish a new connection: [Errno 111] Connection refused')': /
    2022-08-21 12:38:35,649 - urllib3.connectionpool - WARNING - Retrying (Retry(total=0, connect=0, read=1, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f5a33f45570>: Failed to establish a new connection: [Errno 111] Connection refused')': /api/v2/torrents/info
    2022-08-21 12:38:35,650 - bot - ERROR - Failed to connect to qBittorrent. Connection Error: ConnectionError(MaxRetryError("HTTPConnectionPool(host='localhost', port=8090): Max retries exceeded with url: /api/v2/torrents/info (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f5a381116f0>: Failed to establish a new connection: [Errno 111] Connection refused'))"))
    2022-08-21 12:38:38,627 - urllib3.connectionpool - WARNING - Retrying (Retry(total=0, connect=0, read=1, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f5a33f2a4d0>: Failed to establish a new connection: [Errno 111] Connection refused')': /
    2022-08-21 12:38:38,630 - urllib3.connectionpool - WARNING - Retrying (Retry(total=0, connect=0, read=1, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f5a44b2c730>: Failed to establish a new connection: [Errno 111] Connection refused')': /
    2022-08-21 12:38:38,640 - urllib3.connectionpool - WARNING - Retrying (Retry(total=0, connect=0, read=1, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f5a33f290f0>: Failed to establish a new connection: [Errno 111] Connection refused')': /api/v2/auth/login
    2022-08-21 12:38:38,643 - urllib3.connectionpool - WARNING - Retrying (Retry(total=0, connect=0, read=1, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f5a33f45ed0>: Failed to establish a new connection: [Errno 111] Connection refused')': /
    2022-08-21 12:38:38,651 - urllib3.connectionpool - WARNING - Retrying (Retry(total=0, connect=0, read=1, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f5a33f46e30>: Failed to establish a new connection: [Errno 111] Connection refused')': /
    2022-08-21 12:38:38,653 - urllib3.connectionpool - WARNING - Retrying (Retry(total=0, connect=0, read=1, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f5a33f47640>: Failed to establish a new connection: [Errno 111] Connection refused')': /api/v2/auth/login
    2022-08-21 12:38:38,656 - bot - ERROR - Failed to connect to qBittorrent. Connection Error: ConnectionError(MaxRetryError("HTTPConnectionPool(host='localhost', port=8090): Max retries exceeded with url: /api/v2/auth/login (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f5a33f47a60>: Failed to establish a new connection: [Errno 111] Connection refused'))"))
    2022-08-21 12:38:38,809 - urllib3.connectionpool - WARNING - Retrying (Retry(total=0, connect=0, read=1, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f5a44b2c430>: Failed to establish a new connection: [Errno 111] Connection refused')': /
    2022-08-21 12:38:38,812 - urllib3.connectionpool - WARNING - Retrying (Retry(total=0, connect=0, read=1, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f5a44b2d060>: Failed to establish a new connection: [Errno 111] Connection refused')': /
    2022-08-21 12:38:38,818 - urllib3.connectionpool - WARNING - Retrying (Retry(total=0, connect=0, read=1, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f5a33f47e80>: Failed to establish a new connection: [Errno 111] Connection refused')': /api/v2/auth/login
    2022-08-21 12:38:38,823 - urllib3.connectionpool - WARNING - Retrying (Retry(total=0, connect=0, read=1, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f5a33f44df0>: Failed to establish a new connection: [Errno 111] Connection refused')': /
    2022-08-21 12:38:38,827 - urllib3.connectionpool - WARNING - Retrying (Retry(total=0, connect=0, read=1, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f5a3810aa40>: Failed to establish a new connection: [Errno 111] Connection refused')': /
    2022-08-21 12:38:38,841 - urllib3.connectionpool - WARNING - Retrying (Retry(total=0, connect=0, read=1, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f5a44b2c220>: Failed to establish a new connection: [Errno 111] Connection refused')': /api/v2/auth/login
    2022-08-21 12:38:38,842 - bot - ERROR - Failed to connect to qBittorrent. Connection Error: ConnectionError(MaxRetryError("HTTPConnectionPool(host='localhost', port=8090): Max retries exceeded with url: /api/v2/auth/login (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f5a44b2c280>: Failed to establish a new connection: [Errno 111] Connection refused'))")): while getting torrent info
    
    
    
    Bug 
    opened by vishnoe115 12
  • Error R15 (Memory quota vastly exceeded) using qbmirror

    Error R15 (Memory quota vastly exceeded) using qbmirror

    here's the log 2021-11-28T04:27:34.890760+00:00 app[web.1]: 2021-11-28 04:27:34,890 - bot - INFO - https://henilreleases.gq/0:/Weathering.with.You.2019.1080p.BluRay.REMUX.AVC.MULTi.DTS-HD.MA.5.1-HENiL.mkv 2021-11-28T04:27:40.493997+00:00 heroku[web.1]: Process running mem=549M(107.4%) 2021-11-28T04:27:40.496966+00:00 heroku[web.1]: Error R14 (Memory quota exceeded) 2021-11-28T04:27:50.211536+00:00 heroku[web.1]: Process running mem=1279M(250.0%) 2021-11-28T04:27:50.660719+00:00 heroku[web.1]: Error R15 (Memory quota vastly exceeded) 2021-11-28T04:27:50.662796+00:00 heroku[web.1]: Stopping process with SIGKILL 2021-11-28T04:27:50.898135+00:00 heroku[web.1]: Process exited with status 137 2021-11-28T04:27:50.706479+00:00 heroku[web.1]: Process running mem=1243M(242.9%) 2021-11-28T04:27:50.737971+00:00 heroku[web.1]: Error R15 (Memory quota vastly exceeded) 2021-11-28T04:27:50.744258+00:00 heroku[web.1]: Stopping process with SIGKILL 2021-11-28T04:27:50.957641+00:00 heroku[web.1]: State changed from up to crashed

    opened by rajput-hemant 12
  • [Feature Request] Add RSSSUB and RSS_COMMAND for every user

    [Feature Request] Add RSSSUB and RSS_COMMAND for every user

    Is your feature request related to a problem? Please describe.

    Hi,

    İn user settings /usetting it would be great if every user could add its own RSS_COMMAND and it own RSS feed to subscribe.

    Hope you can add this in your TODO list sir? And thank you for your great work btw keep it up.👍🙂

    opened by erickyun 2
  • Add rclone support

    Add rclone support

    Is your feature request related to a problem? Please describe. This repo is only missing out rclone support capabilities. Would be very helpful if we could transfer files to other storage provider, say OneDrive instead of Gdrive.

    Describe the solution you'd like Rclone support would definitely fix the issue.

    Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

    Additional context Thank you for your time and consideration.

    Feature 
    opened by sobuj53 9
Owner
Anas
Mechanical Engineer
Anas
Aria/qBittorrent Telegram mirror/leech bot.

Missneha Mirror Leech Bot Aria/qBittorrent Telegram mirror/leech bot. missneha Mirror Leech Bot is a multipurpose Telegram Bot written in Python for m

ACHAL 6 Sep 30, 2022
Bagas Mirror&Leech Bot is a multipurpose Telegram Bot written in Python for mirroring files on the Internet to our beloved Google Drive. Based on python-aria-mirror-bot

- [ MAYBE UPDATE & ADD MORE MODULE ] Bagas Mirror&Leech Bot Bagas Mirror&Leech Bot is a multipurpose Telegram Bot written in Python for mirroring file

null 4 Nov 23, 2021
Qbittorrent / Aria2 Mirror & Leech Telegram Bot

This is a Telegram Bot written in Python for mirroring files on the Internet to your Google Drive or Telegram. Based on python-aria-mirror-bot Feature

Hüzünlü Artemis [HuzunluArtemis] 81 Jul 15, 2022
null 1 Feb 18, 2022
AK-LEECH-BOT - AK LEECH BOT For python

Benefits :- ✓ Google Drive link cloning using gclone.(wip) ✓ Telegram File mirro

null 5 Mar 24, 2022
✨ A Telegram mirror/leech bot By SparkXcloud Group ✨

SparkXcloud-Gdrive-MirrorBot SparkXcloud-Gdrive-MirrorBot is a multipurpose Telegram Bot writen in Python for mirroring files on the Internet to our b

null 119 Oct 23, 2022
Aria & Qbittorent Mirror Bot

Eunha Mirror Eunha Mirror is a multipurpose Telegram Bot writen in Python for mirroring files on the Internet to our beloved Google Drive. Features su

ovin 158 Dec 19, 2022
A PowerPacked Version Of Telegram Leech Bot With Modern Easy-To-Use Interface & UI !

FuZionX Leech Bot A Powerful Telegram Leech Bot Modded by MysterySD to directly Leech to Telegram, with Multi Direct Links Support for Enhanced Leechi

MysterySD 28 Oct 9, 2022
A powerfull Telegram Leech Bot

owner of this repo :- Abijthkutty contact me :- Abijth Telegram Torrent and Direct links Leecher Dont Abuse The Repo ... this is intented to run in Sm

αвιנтн 9 Jun 11, 2022
This Mirror Bot is a multipurpose Telegram Bot writen in Python for mirroring files on the Internet to our beloved Google Drive.

MIRROR HUNTER This Mirror Bot is a multipurpose Telegram Bot writen in Python for mirroring files on the Internet to our beloved Google Drive. Repo la

anime republic 130 May 28, 2022
Slam Mirror Bot is a multipurpose Telegram Bot written in Python for mirroring files on the Internet to our beloved Google Drive.

Slam Mirror Bot is a multipurpose Telegram Bot written in Python for mirroring files on the Internet to our beloved Google Drive.

Abinash939 1 Oct 10, 2021
A Telegram mirror bot which can be deployed using Heroku.

Slam Mirror Bot This is a telegram bot writen in python for mirroring files on the internet to our beloved Google Drive. Getting Google OAuth API cred

Hafitz Setya 1.2k Jan 1, 2023
A telegram mirror bot with an integrated RSS feed reader.

About What is this repo? This is a slightly modified fork which includes some extra features & memes added to my liking. How's this different from the

null 11 May 15, 2022
A PowerFull Telegram Mirror Bot.......

- [ DEAD REPO AND NO MORE UPDATE ] Slam Mirror Bot Slam Mirror Bot is a multipurpose Telegram Bot written in Python for mirroring files on the Interne

αвιנтн 2 Nov 9, 2021
Asynchronous python aria2 mirror bot Telegram.

aioaria2-mirror-bot A Bot for Telegram made with Python using Pyrogram library. It needs Python 3.9 or newer to run. THIS BOT IS INTENDED TO BE USED O

Adek 85 Jan 3, 2023
Telegram bot to stream videos in telegram voicechat for both groups and channels. Supports live strams, YouTube videos and telegram media.

Telegram VCVideoPlayBot An Telegram Bot By @ZauteKm To Stream Videos in Telegram Voice Chat. NOTE: Make sure you have started a VoiceChat in your Grou

Zaute 20 Oct 21, 2022
Telegram bot to stream videos in telegram voicechat for both groups and channels. Supports live strams, YouTube videos and telegram media.

Telegram bot to stream videos in telegram voicechat for both groups and channels. Supports live strams, YouTube videos and telegram media.

SUBIN 449 Dec 27, 2022
This is telegram bot to generate string session for using user bots. You can see live bot in https://telegram.dog/string_session_Nsbot

TG String Session Generate Pyrogram String Session Using this bot. Demo Bot: Configs: API_HASH Get from Here. API_ID Get from Here. BOT_TOKEN Telegram

Anonymous 27 Oct 28, 2022