Giter VIP home page Giter VIP logo

mirrorbot137's Introduction

MirrorBot137

Important - Read these points first

  • Original repo is https://github.com/lzzy12/python-aria-mirror-bot
  • I have collected some cool features from various repositories and merged them in one.
  • So, credits goes to original repo holder, not to me. I have just collected them.
  • This (or any custom) repo is not supported in official bot support group.

What is this repo about?

This is a telegram bot writen in python for mirroring files on the internet to our beloved Google Drive.

Inspiration

This project is heavily inspired from @out386 's telegram bot which is written in JS .

Features supported:
  • Mirroring direct download links to google drive/Telegram
  • Mirroring Mega.nz links to google drive/Telegram
  • Mirror Telegram files to google drive
  • Mirror all youtube-dl supported links
  • Mirror Torrent Files and magnet links
  • Mirror By Reply
  • Mirror/Leech multiple Links or Files
  • Custom filename support in direct link, telegram files, YT-DL links
  • 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.

  • Copy files from someone's drive to your drive (using Autorclone)
  • Service account support in cloning and uploading
  • Download/upload progress,speeds and ETAs
  • Docker support
  • Uploading To Team Drives.
  • Index Link support
  • Shortener support
  • View Index Links To Steam Videos Or Music Online (Works With Bhadoo)
  • Leech Files To Telegram with custom Thumbnail & Names.
  • Multi Drive Search.
  • SpeedTest.
  • Count Drive Files.
  • Extract password protected files (It's not hack, you have to enter password)
  • For extracting password protected files, using custom filename and download
  • Update bot at startup and with restart command using UPSTREAM_REPO
  • Log Chat for mirror messages
  • Telegram Premium 4GB upload
  • Custom Name for all links except torrents. Must add extension except stream/yt links.
  • Send files directly to PM

Multi Search IDs

To use list from multi TD/folder. Run driveid.py in your terminal and follow it. It will generate drive_folder file or u can simply create drive_folder file in working directory and fill it, check below format:

MyTdName tdID IndexLink(if available)
MyTdName2 tdID IndexLink(if available)

Turn On RECURSIVE_SEARCH In Config -RECURSIVE_SEARCH = "True"

How to deploy?

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

Installing requirements

  • Clone this repo:
git clone -b master https://github.com/rahulkhatri137/mirrorbot137
cd mirrorbot137
  • Install requirements For Debian based distros
sudo apt install python3

Install Docker by following the official docker docs

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

Deploying

  • Start docker daemon (skip if already running):
sudo dockerd
  • Build Docker image:
sudo docker build . -t mirror-bot
  • Run the image:
sudo docker run mirror-bot
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:

1. Required Fields

  • 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. Int
  • 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. Int
  • GDRIVE_FOLDER_ID: This is the Folder/TeamDrive 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: Time in seconds after which the progress/status message will be updated. Recommended 10 seconds at least. Int
  • 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 disable auto message deletion. Int

2. Optional Fields

  • UPSTREAM_REPO: Your github repository link, if your repo is private add https://username:{githubtoken}@github.com/{username}/{reponame} format. Get token from Github settings. So you can update your bot from filled repository on each restart.

    • NOTE: Any change in docker or requirements you need to deploy/build again with updated repo to take effect. DON'T delete .gitignore file.
  • UPSTREAM_BRANCH: Upstream branch for update. Default is master.

  • ACCOUNTS_ZIP_URL: Only if you want to load your Service Account externally from an Index Link or by any direct download link NOT webpage link. Archive the accounts folder to ZIP file. Fill this with the direct download link of zip file. If index need authentication so add direct download as shown below:

  • 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.

  • DATABASE_URL: Your SQL Database URL. Follow the Generate Database Guide below. Data will be saved in Database: auth and sudo users, leech settings including thumbnails for each user, rss data and incomplete tasks. NOTE: If deploying on heroku and using heroku postgresql delete this variable from config.env file. DATABASE_URL will be grabbed from heroku variables.

  • AUTHORIZED_CHATS: Fill user_id and chat_id of groups/users you want to authorize. Separate them by space.

  • SUDO_USERS: Fill user_id of users whom you want to give sudo permission. Separate them by space.

  • IS_TEAM_DRIVE: Set True if uploading to TeamDrive. Default is False. Bool

  • USE_SERVICE_ACCOUNTS: Whether to use Service Accounts or not. For this to work see Using Service Accounts section below. Default is False. Bool

  • INDEX_URL: Refer to Bhadoo Index GoIndex GD Index.

  • MEGA_KEY: Mega.nz API key to mirror mega.nz links. Get it from Mega SDK Page

  • MEGA_USERNAME: E-Mail ID used to sign up on mega.nz for using premium account.

  • MEGA_PASSWORD: Password for mega.nz account.

  • UPTOBOX_TOKEN: Uptobox token to mirror uptobox links. Get it from Uptobox Premium Account.

  • STOP_DUPLICATE_CLONE: 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 file hash, so this feature is not perfect yet). Default is False. Bool

  • CLONE_LIMIT: To limit the size of Google Drive folder/file which you can clone. Don't add unit. Default unit is GB.

  • 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, compatible with BhadooIndex Code. Default is False. Bool

  • IGNORE_PENDING_REQUESTS: Ignore pending requests after restart. Default is False. Bool

  • SESSION_STRING: To download/upload from your telegram account. To generate session string use this command python3 generate_string_session.py after mounting repo folder for sure.

  • NOTE: You can't use bot with private message, use it with group or channel.

  • TG_SPLIT_SIZE: Size of split in bytes. Default is 2GB. Default is 4GB if your account is premium.

  • AS_DOCUMENT: Default type of Telegram file upload. Default is False mean as media. Bool

  • CUSTOM_FILENAME: Add custom word to leeched file name.

  • SHORTENER_API: Fill your Shortener API key.

  • SHORTENER: Shortener URL.

    • Supported URL Shorteners:

    exe.io gplinks.in shrinkme.io urlshortx.com shortzon.com

  • CRYPT: Cookie for gdtot google drive link generator.

  • RECURSIVE_SEARCH: T/F And Fill drive_folder File Using Driveid.py Script.

  • LOGS_CHATS: Chat ids of channels/groups where you want to store Mirror logs, NOTE Add bot in Mirror logs channel/group as Admin.

  • BOT_PM: Set to "True" if you want files to be sent to user PM

    • BUTTON_THREE_NAME:
    • BUTTON_THREE_URL:
    • BUTTON_FOUR_NAME:
    • BUTTON_FOUR_URL:
    • BUTTON_FIVE_NAME:
    • BUTTON_FIVE_URL:

Note: You can limit maximum concurrent downloads by changing the value of MAX_CONCURRENT_DOWNLOADS in aria.sh.

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 Other and Create.
  • Use the download button to download your credentials.
  • Move that file to the root of mirror-bot, 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 file (token.pickle) for Google Drive:
pip install google-api-python-client google-auth-httplib2
google-auth-oauthlib python3 generate_drive_token.py 

Gdtot Cookies

To Clone or Leech gdtot link follow these steps:

  1. Login/Register to gdtot.
  2. Copy this script and paste it in browser address bar.
    • Note: After pasting it check at the beginning of the script in broswer address bar if javascript: exists or not, if not so write it as shown below.
    javascript:(function () {
      const input = document.createElement('input');
      COOKIE = JSON.parse(JSON.stringify({cookie : document.cookie}));
      input.value = COOKIE['cookie'].split('crypt=')[1];
      document.body.appendChild(input);
      input.focus();
      input.select();
      var result = document.execCommand('copy');
      document.body.removeChild(input);
      if(result)
        alert('Crypt copied to clipboard');
      else
        prompt('Failed to copy Crypt. Manually copy below Crypt\n\n', input.value);
    })();
    
    • After pressing enter your browser will prompt a alert.
  3. Now you'll get CRYPT in your clipboard
    NGxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxWdSVT0%3D
    
  4. From this you have to paste value of CRYPT in config.env file.

Generate Database

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

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 Many thanks to AutoRClone for the scripts NOTE: Using service accounts is only recommended while uploading to a team drive.

Generating service accounts

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 sa allow you plenty of use, its also possible that over abuse might get your projects banned by google.

Note: 1 service account can copy around 750gb a day, 1 project can make 100 service accounts so that's 75tb a day, for most users this should easily suffice.

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

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

Add all the service accounts to the Team Drive

  • Run:
python3 add_to_team_drive.py -d SharedTeamDriveSrcID

Youtube-dl authentication using .netrc file

For using your premium accounts in youtube-dl, edit the netrc file (in the root directory of this repository) according to following format:

machine host login username password my_youtube_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.

Commands to set via @BotFather

mirror - Mirror
zipmirror - Mirror and upload as zip
unzipmirror - Mirror and extract files
leech - Leech to Telegram
zipleech - Leech and upload as zip
unzipleech - Leech and extract files
clone - Copy file/folder to Drive
count - Count file/folder of Drive
watch - Mirror yt-dlp supported link
zipwatch - Mirror yt-dlp supported link as zip
leechwatch - Leech through yt-dlp supported link
leechzipwatch - Leech yt-dlp support link as zip
leechset - Leech settings
setthumb - Set thumbnail
status - Get Mirror Status message
list - Search files in Drive
cancel - Cancel a task
cancelall - Cancel all tasks
del - Delete file/folder from Drive{owner}
log - Get the Bot Log{owner}
restart - Restart the Bot{sudo}
stats - Bot Usage Stats
ping - Ping the Bot
help - All cmds with description

Deploy on GitHub actions

Deploying on Heroku

  • Token Pickle URL is must for deploying on Heorku!

Deploy

  • Deploying on Heroku with Github Workflow

Credits :-

mirrorbot137's People

Contributors

rahulkhatri137 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

mirrorbot137's Issues

Qbit

this repo has just aria right , and No Qbit at all ?

Update

when running , the bot or restarting it to update , I get this error , tried putting a public repo and a private one , same result always.

Capture

Ping Web app

there's not web app to ping , while deploying on koyeb , I've successfully deployed it and it's running , but it crashes after sometime , it's because there's not web app to ping , is there any fix for that ?

BAN

We couldn't deploy your app because the source code violates the Salesforce Acceptable Use and External-Facing Services Policy.

Boot Timeout

2021-10-21T04:31:34.901090+00:00 app[web.1]: self.run()

2021-10-21T04:31:34.901091+00:00 app[web.1]: File "/usr/lib/python3.8/threading.py", line 870, in run

2021-10-21T04:31:34.901092+00:00 app[web.1]: self._target(*self._args, **self._kwargs)

2021-10-21T04:31:34.901092+00:00 app[web.1]: File "/usr/src/app/bot/helper/mirror_utils/download_utils/aria2_download.py", line 26, in __onDownloadStarted

2021-10-21T04:31:34.901092+00:00 app[web.1]: if dl.getListener().isTar == True:

2021-10-21T04:31:34.901093+00:00 app[web.1]: AttributeError: 'NoneType' object has no attribute 'getListener'

2021-10-21T04:32:21.963367+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch

2021-10-21T04:32:22.028491+00:00 heroku[web.1]: Stopping process with SIGKILL

workflows not work

2021-10-21T08:09:37.211563+00:00 app[web.1]: File "/usr/lib/python3.8/logging/init.py", line 1475, in error

2021-10-21T08:09:37.211563+00:00 app[web.1]: File "/usr/lib/python3.8/logging/init.py", line 1589, in _log

2021-10-21T08:09:37.211563+00:00 app[web.1]: File "/usr/lib/python3.8/logging/init.py", line 1599, in handle

2021-10-21T08:09:37.211564+00:00 app[web.1]: File "/usr/lib/python3.8/logging/init.py", line 1661, in callHandlers

2021-10-21T08:09:37.211564+00:00 app[web.1]: File "/usr/lib/python3.8/logging/init.py", line 954, in handle

2021-10-21T08:09:37.211565+00:00 app[web.1]: File "/usr/lib/python3.8/logging/init.py", line 1186, in emit

2021-10-21T08:09:37.211566+00:00 app[web.1]: File "/usr/lib/python3.8/logging/init.py", line 1176, in _open

2021-10-21T08:09:37.211566+00:00 app[web.1]: NameError: name 'open' is not defined

Project dependencies may have API risk issues

Hi, In mirrorbot137, inappropriate dependency versioning constraints can cause risks.

Below are the dependencies and version constraints that the project is using

appdirs
aria2p
beautifulsoup4
google-api-python-client
google-auth-httplib2
google-auth-oauthlib
js2py
lk21
lxml
megasdkrestclient
psutil
pybase64
hachoir
pillow
speedtest-cli
cfscrape
Pyrogram
python-dotenv
python-magic
python-telegram-bot
psycopg2
requests
telegraph
tenacity
TgCrypto
yt-dlp

The version constraint == will introduce the risk of dependency conflicts because the scope of dependencies is too strict.
The version constraint No Upper Bound and * will introduce the risk of the missing API Error because the latest version of the dependencies may remove some APIs.

After further analysis, in this project,
The version constraint of dependency aria2p can be changed to >=0.2.0,<=0.9.1.
The version constraint of dependency beautifulsoup4 can be changed to >=4.10.0,<=4.11.1.
The version constraint of dependency google-api-python-client can be changed to >=1.4.0,<=2.51.0.
The version constraint of dependency lk21 can be changed to ==1.6.0.
The version constraint of dependency psutil can be changed to >=1.0.0,<=5.9.1.
The version constraint of dependency pillow can be changed to ==9.2.0.
The version constraint of dependency pillow can be changed to >=2.0.0,<=9.1.1.
The version constraint of dependency cfscrape can be changed to >=1.3,<=1.4.1.
The version constraint of dependency cfscrape can be changed to >=1.4.3,<=1.6.1.
The version constraint of dependency Pyrogram can be changed to >=1.0.0,<=2.0.57.
The version constraint of dependency python-magic can be changed to >=0.4.0,<=0.4.18.
The version constraint of dependency python-magic can be changed to >=0.4.20,<=0.4.27.
The version constraint of dependency python-telegram-bot can be changed to >=4.0rc1,<=13.12.
The version constraint of dependency requests can be changed to >=0.10.1,<=2.24.0.
The version constraint of dependency requests can be changed to ==2.26.0.
The version constraint of dependency yt-dlp can be changed to >=2021.2.24,<=2022.9.1.

The above modification suggestions can reduce the dependency conflicts as much as possible,
and introduce the latest version as much as possible without calling Error in the projects.

The invocation of the current project includes all the following methods.

The calling methods from the aria2p
aria2p.API.get_downloads
aria2p.API.remove
aria2p.API.add_uris
aria2p.Client
aria2p.API
The calling methods from the beautifulsoup4
bs4.BeautifulSoup
The calling methods from the google-api-python-client
googleapiclient.http.MediaIoBaseDownload
googleapiclient.discovery.build
googleapiclient.http.MediaFileUpload
googleapiclient.http.MediaIoBaseDownload.next_chunk
The calling methods from the lk21
lk21.Bypass.bypass_antfiles
lk21.Bypass.bypass_fembed
lk21.Bypass.bypass_url
lk21.Bypass
lk21.Bypass.bypass_filesIm
lk21.Bypass.bypass_streamtape
lk21.Bypass.bypass_anonfiles
lk21.Bypass.bypass_sbembed
The calling methods from the psutil
psutil.net_io_counters
psutil.cpu_percent
psutil.virtual_memory
psutil.disk_usage
The calling methods from the pillow
PIL.Image.open
The calling methods from the cfscrape
cfscrape.create_scraper
The calling methods from the Pyrogram
pyrogram.idle
pyrogram.Client
The calling methods from the python-magic
magic.Magic
magic.Magic.from_file
The calling methods from the python-telegram-bot
telegram.InlineKeyboardButton
telegram.InlineKeyboardMarkup
telegram.ext.CallbackQueryHandler
telegram.ext.Updater
telegram.ext.CommandHandler
The calling methods from the requests
requests.post
requests.get
requests.head
requests.utils.quote
requests.session
The calling methods from the yt-dlp
yt_dlp.YoutubeDL
The calling methods from the all methods
download.eta
divmod
schats.split.split
cfscrape.create_scraper
status_utils.youtube_dl_download_status.YoutubeDLDownloadStatus
lk21.Bypass.bypass_sbembed
os.path.splitext.upper
bot.helper.ext_utils.bot_utils.time.time
cloud.projects.create
bot.helper.ext_utils.bot_utils.is_gdtot_link
bot.helper.telegram_helper.message_utils.editMessage
download.torrent_info
file.upper.endswith
getConfig
matches.str.b64decode.decode
self.telegraph_content.append
Exception
word.isdigit
page_token.folder_id.self.__service.files.list.execute.extend
self.stopEvent.wait
service.projects.serviceAccounts
download.processed_bytes
bot.updater.start_polling
enumerate
urllib.parse.unquote
item.get
bot.helper.mirror_utils.download_utils.direct_link_generator.gdtot
self.speed_raw
self.__onDownloadStart
google_auth_oauthlib.flow.InstalledAppFlow.from_client_secrets_file
bot.helper.telegram_helper.button_build.ButtonMaker.buildbutton
_SudoUser
os.path.join.split
file_id.self.__service.files.get.execute.next_chunk
bot.helper.mirror_utils.status_utils.tar_status.TarStatus
self.__listener.onUploadError
bot.app.send_video
self.extractMetaData
bot.helper.mirror_utils.download_utils.aria2_download.AriaDownloadHelper
bot.helper.ext_utils.bot_utils.is_magnet
bot.dispatcher.add_handler
self.escapes
achats.split.split
aria2p.API.get_downloads
serviceusage.services.enable
path._message.self.__download.threading.Thread.start
self.telegraph.create_page
os.listdir
bot.helper.telegram_helper.filters.CustomFilters.authorized_chat
self.download_file
shutil.rmtree
requests.utils.quote
bot.helper.telegram_helper.message_utils.deleteMessage
glob.glob
requests.session.get
self.upload_dir
os.path.lexists
bot.helper.mirror_utils.status_utils.upload_status.UploadStatus
bot.helper.mirror_utils.status_utils.gdownload_status.DownloadStatus
_get_projects
self.conn.close
iam.projects.serviceAccounts
bot.helper.telegram_helper.message_utils.sendLogFile
ydl.prepare_filename
bot.SUDO_USERS.remove
iam.projects.serviceAccounts.keys
argparse.ArgumentParser.parse_args
subprocess.Popen
logging.getLogger.setLevel
shutil.disk_usage
len.encode
uptobox
anonfiles
self.__mega_client.getDownloadInfo
argparse.ArgumentParser.add_argument
page_token.folder_id.self.__service.files.list.execute.get
super
str.replace.replace
bot.helper.mirror_utils.download_utils.youtube_dl_download_helper.YoutubeDLHelper.extractMetaData
sendMarkup
self.onDownloadError
name.strip.startswith
googleapiclient.http.MediaIoBaseDownload
bot.helper.mirror_utils.upload_utils.pyrogramEngine.TgUploader.upload
query.self.__service.files.list.execute
bot.helper.ext_utils.telegraph_helper.telegraph.edit_page
exit
urls.append
bot.helper.mirror_utils.upload_utils.gdriveTools.GoogleDriveHelper.deletefile
bot.helper.mirror_utils.download_utils.direct_link_generator.direct_link_generator.isdigit
self.__mega_client.cancelDl
pyrogram.Client
_create_sa_keys
self.cur.close
logging.getLogger.error
bytes
self.gDrive_directory
bot.helper.telegram_helper.message_utils.sendStatusMessage
logging.getLogger.debug
self.getFilesByFolderId
re.sub
get_download
PIL.Image.open.thumbnail
logging.getLogger.warning
client.get
_generate_id
delete_all_messages
pyrogram.idle
err.str.replace.replace
requests.post.json
bot.helper.ext_utils.fs_utils.start_cleanup
dl.getListener.onDownloadComplete.threading.Thread.start
progress.bar.Bar.finish
bot.download_dict.keys
self.cur.execute
file.truncate
bot.helper.ext_utils.telegraph_helper.telegraph.create_page
self.sent_msg.reply_document
signal.signal
urllib.parse.urlparse
self.__service.permissions.create
self.edit_page
_watch
self.progress_raw
bot.helper.ext_utils.bot_utils.is_url
bs4.BeautifulSoup.find_all
join
path.Path.mkdir
fembed
dl.status.processed_bytes
before_log
bot.helper.ext_utils.bot_utils.is_mega_link
bot.helper.mirror_utils.download_utils.direct_link_generator.direct_link_generator.split
bot.helper.telegram_helper.button_build.ButtonMaker.build_menu
telegram.InlineKeyboardMarkup
dl.download.cancel_download
self.__listener.onDownloadStarted
_mirror
bot.helper.mirror_utils.upload_utils.gdriveTools.GoogleDriveHelper.drive_list
bot.bot.delete_message
self.__app.get_messages
bot.helper.telegram_helper.message_utils.sendMessage
exception.str.startswith
limit.split.split
get_readable_file_size
os.path.basename
TelegraphHelper
self.getFileMetadata.get
sendMessage
service.projects
megasdkrestclient.MegaSdkRestClient
bot.helper.ext_utils.fs_utils.get_path_size
self.gDrive_file
split
os.environ.get
file_metadata.self.__service.files.create.execute
retry
googleapiclient.discovery.build.new_batch_http_request
bot.helper.ext_utils.fs_utils.take_ss
psycopg2.connect.commit
set
megasdkrestclient.MegaSdkRestClient.login
bot.aria2.add_uris
any
bot.helper.ext_utils.fs_utils.tar
float
logging.getLogger.info
self.create_directory
bot.app.get_messages
pixeldrain
self.authorize
stop_after_attempt
_create_accounts
message.text.str.split
exceptions.NotSupportedExtractionArchive
MyLogger
self.uid.download_dict.path
sbembed
bot.AUTHORIZED_CHATS.add
psutil.net_io_counters
file.get.self.__service.files.get.execute
open
self.switchServiceAccount
hachoir.metadata.extractMetadata
googleapiclient.discovery.build.projects
name.strip.strip
bot.helper.telegram_helper.filters.CustomFilters.authorized_user
bot.AS_MEDIA_USERS.remove
ydl.download
drive.new_batch_http_request.add
urllib.parse.parse_qs
bot.helper.mirror_utils.upload_utils.gdriveTools.GoogleDriveHelper.uni_drive_list
bot.helper.ext_utils.db_handler.DbManger.db_auth
status.gid
self.__service.files
self.aria_download
google_auth_oauthlib.flow.InstalledAppFlow.from_client_secrets_file.run_console
threading.Thread
hxfile
conn.cursor.fetchall
bot.helper.mirror_utils.download_utils.aria2_download.AriaDownloadHelper.start_listener
clean_all
os.makedirs
iam.new_batch_http_request.add
new_projs.append
self.conn.cursor
self.__download.progress_string
psutil.virtual_memory
bot.helper.mirror_utils.upload_utils.gdriveTools.GoogleDriveHelper
googleapiclient.discovery.build.permissions
super.__init__
letsupload
listener.onDownloadError
self.onUploadError
bot.status_reply_dict.values
self.__service.files.create
psycopg2.connect.cursor
self.dobj.dspeed
self.__service.files.list
iam.projects.serviceAccounts.delete
faulthandler.enable
conn.cursor.execute
f.close
playlist.qual.name.task_id.DOWNLOAD_DIR.link.ydl.add_download.threading.Thread.start
bot.download_dict.items
hachoir.metadata.extractMetadata.has
ValueError
self.edit_telegraph
self.__periodic.cancel
os.path.exists
magic.Magic.from_file
credentials.open.read
bot.helper.telegram_helper.message_utils.sendMarkup
download.name
self.uid.download_dict.name
googleapiclient.discovery.build
self.__onDownloadError
bot.bot.send_document
BLOCK_MEGA_LINKS.lower.lower
bot.Interval.cancel
bot.AS_DOC_USERS.remove
serviceaccountfactory.values
self.disconnect
page_token.folder_id.self.__service.files.list.execute
cloud.operations.get
time.sleep
self.getFileMetadata
bot.helper.mirror_utils.upload_utils.gdriveTools.GoogleDriveHelper.clonehelper
update_all_messages
min
getConfig.endswith
PIL.Image.open
line.strip.split
str_1.str.lower
self.copyFile
project.iam.projects.serviceAccounts.list.execute
logging.StreamHandler
lk21.Bypass.bypass_streamtape
telegram.ext.CommandHandler
file.upper
yandex_disk
mediafire
dl_link.rsplit
gdtot
self.telegraph.create_account
os.walk
bot.aria2.remove_all
pageSource.re.search.group
multi.pswd.isLeech.extract.isZip.isTar.update.bot._mirror.threading.Thread.start
self.dstatus.progress
str
self.create_page
f.write
file_name.open.write
pickle.dump
info_link.requests.get.json
get_progress_bar_string
requests.session
_OwnerFilter
os.path.splitext
os.path.getsize
dlDetails.status
set.add
bot.helper.ext_utils.db_handler.DbManger.db_rmsudo
bot.helper.mirror_utils.status_utils.aria_download_status.AriaDownloadStatus
service.services.enable
_AuthorizedChat
bot.aria2.get_downloads
bot.helper.mirror_utils.upload_utils.gdriveTools.GoogleDriveHelper.clone
urllib.parse.quote
rtnlist.reverse
proj_id.serviceusage.services.enable.execute
map
get_path_size
err.str.replace
telegram.InlineKeyboardButton
bot.helper.mirror_utils.upload_utils.pyrogramEngine.TgUploader
line.split
bot.LOGGER.warning
self.__app.stop_transmission
page_token.q.self.__service.files.list.execute
self.path.append
self.cobj.cspeed
self._bot.download_media
bot.helper.ext_utils.bot_utils.check_limit
pathlib.Path
link.split.strip
file_id.self.__service.files.get.execute.get
des_dir.Image.open.convert.save
threading.Event
dl.status.size_raw
telegram.ext.CallbackQueryHandler
requests.session.post.json
aria2c_init.threading.Thread.start
bot.helper.ext_utils.bot_utils.getDownloadByGid.uid
retry_if_exception_type
mktable
bot.IS_TEAM_DRIVE.file_id.self.__service.files.delete.execute.group
list
bot.helper.ext_utils.bot_utils.getDownloadByGid
bot.helper.ext_utils.bot_utils.get_readable_message
bot.helper.telegram_helper.message_utils.LOGGER.info
bot.Interval.append
requests.head
range.append
base64.standard_b64encode
time.time
logging.FileHandler
file_metadata.self.__service.files.create.execute.get
data.find
bs4.BeautifulSoup
bot.aria2.add_magnet
_BotCommands
threading.RLock
self._bot.stop_transmission
conn.cursor.close
deleteMessage
self.processed_bytes
os.path.isfile
data.split.split
download.gid
dl.getListener.onDownloadError
io.FileIO
err.content.json.loads.get.get.get
re.search
DRIVE_ID.append
client.cookies.update
requests.post
zippy_share
str_3.str.lower
re.search.group
newname.split.split
link.api.format.requests.get.json
_create_projects
bool
bot.IS_TEAM_DRIVE.file_id.self.__service.files.delete.execute
link.urlparse._replace.geturl
print
streamtape
self.__listener.onDownloadError
self.sent_msg.reply_audio
bot.helper.mirror_utils.status_utils.clone_status.CloneStatus
download.speed.split
google.oauth2.service_account.Credentials.from_service_account_file.refresh
ydl.extract_info
f.readlines
self.aria_download.eta_string
bot.helper.mirror_utils.upload_utils.gdriveTools.GoogleDriveHelper.count
UNI_INDEX_URL.append
self.obj.speed
bot.helper.ext_utils.db_handler.DbManger
aria2p.API
iam.projects.serviceAccounts.list
self.__mega_client.addDl
bot.helper.ext_utils.db_handler.DbManger.db_addsudo
resp.b64decode.decode
f.truncate
re.split
api.get_download
logging.getLogger
file_id.self.__service.files.get.execute
status_utils.telegram_download_status.TelegramDownloadStatus
PIL.Image.open.save
js_script.find_all.find_all
bot.aria2.remove
cfscrape.create_scraper.post
bot.helper.mirror_utils.download_utils.direct_link_generator.direct_link_generator.startswith
_list_sas
self.__update
racaty
bot.helper.ext_utils.db_handler.DbManger.db_unauth
err.resp.get
update.message.text.split.split
logging.warning
hachoir.parser.createParser
bot.status_reply_dict.keys
sendStatusMessage
self.getIdFromUrl
err.resp.get.startswith
max
bot.helper.mirror_utils.upload_utils.gdriveTools.GoogleDriveHelper.upload
github
osdn
download.size_raw
body.file_id.self.__service.files.copy.execute
choose_msg.update.message.context.bot.auto_delete_message.threading.Thread.start
page.find.findAll
bot.helper.ext_utils.fs_utils.get_base_name
bot.helper.ext_utils.fs_utils.clean_all
bot.bot.edit_message_text
drive.new_batch_http_request.execute
bot.helper.mirror_utils.download_utils.aria2_download.AriaDownloadHelper.add_download
err.content.json.loads.get.get
permissions.drive_id.self.__service.permissions.create.execute
wait_exponential
lk21.Bypass.bypass_fembed
json.loads
bot.helper.ext_utils.bot_utils.get_readable_file_size
self.telegraph.get_access_token
orig_path.replace
line.strip
len
bot.app.download_media
range.insert
re.findall
psycopg2.connect.close
random.choice
aria2p.API.add_uris
self.upload_file
download.speed
lk21.Bypass.bypass_url
bot.helper.telegram_helper.button_build.ButtonMaker
bot.AS_DOC_USERS.add
self.stopEvent.set
bot.helper.mirror_utils.download_utils.youtube_dl_download_helper.YoutubeDLHelper
bot.helper.ext_utils.exceptions.DirectDownloadLinkException
bot.aria2.listen_to_notifications
IndexError
str_2.str.split
aria2p.API.remove
psutil.disk_usage
self.__listener.onUploadStarted
iam.new_batch_http_request.execute
service.new_batch_http_request
bot.bot.set_my_commands
os.path.abspath
dl.gid
bot.helper.mirror_utils.download_utils.telegram_downloader.TelegramDownloadHelper
i.open.read
error.replace.replace
self.name
file.get_file
bot.helper.ext_utils.bot_utils.get_readable_time
format
bs4.BeautifulSoup.find
self.__service.files.get_media
lk21.Bypass.bypass_anonfiles
self.button.append
orig_path.endswith
rtnlist.append
self.__service.files.get.execute.get
threading.Thread.start
reply_to.text.strip
self.__G_DRIVE_DIR_BASE_DOWNLOAD_URL.format
logging.error
aria2p.Client
_delete_sas
bot.helper.ext_utils.bot_utils.setInterval
download.size
self.sent_msg.reply_video
file.write
socket.setdefaulttimeout
flow.run_console.refresh
_create_remaining_accounts
realName.str.split
self.get_recursive_list
logging.basicConfig
round
bot.helper.ext_utils.fs_utils.get_mime_type
re.match
bot.app.send_audio
e._get_reason
MirrorListener
bot.helper.ext_utils.bot_utils.getDownloadByGid.getListener
mssg.split
link.re.search.group
sorted.extend
service.projects.list.execute
isinstance
self.status.progress
rsoup.find.replace
self.clean
io.FileIO.close
self.__G_DRIVE_BASE_DOWNLOAD_URL.format
lk21.Bypass.bypass_filesIm
err.content.json.loads.get
pyrogram.Client.get_me
bot.bot.send_message
e.last_attempt.exception
ydl.extractMetaData.get
bot.LOGGER.info
os.path.join
bot.helper.mirror_utils.download_utils.telegram_downloader.TelegramDownloadHelper.add_download
bot.AUTHORIZED_CHATS.remove
os.rename
download.progress
project_create_ops.append
random.SystemRandom.choices
lk21.Bypass
bot.helper.mirror_utils.download_utils.mega_download.MegaDownloader
bot.helper.ext_utils.bot_utils.time.sleep
drive.permissions.create
base64.b64decode
query.message.delete
self.__set_permission
bot.helper.ext_utils.bot_utils.LOGGER.info
progress.bar.Bar.next
set.remove
mirror.MirrorListener
bot.app.start
antfiles
bot.helper.ext_utils.bot_utils.getAllDownload.gid
main
self.__onDownloadProgress
bot.helper.ext_utils.bot_utils.getAllDownload.status
fichier
media_body.file_metadata.self.__service.files.create.execute
bot.helper.ext_utils.bot_utils.getAllDownload.download
lk21.Bypass.bypass_antfiles
status_utils.mega_status.MegaDownloadStatus
sorted
os.remove
service.services
pathlib.PurePath
AS_DOCUMENT.lower.lower
_MirrorOwner
self.drive_query
self.create_account
self.conn.commit
update.message.text.split
e.content.decode
bot.helper.telegram_helper.message_utils.update_all_messages
os.execl
name.strip.split
self.deletefile
mssg.split.strip
self.aria_download.total_length_string
cfscrape.create_scraper.get
int
telegram.ext.Updater
str_2.str.lower
self.__download
bot.helper.ext_utils.fs_utils.split
join.groups
googleapiclient.discovery.build.operations
self._bot.get_messages
argparse.ArgumentParser
query.answer
google.auth.transport.requests.Request
krakenfiles
telegraph.Telegraph
dotenv.load_dotenv
bot.helper.ext_utils.bot_utils.getAllDownload
bot.helper.ext_utils.fs_utils.clean_download
query.self.__service.files.list.execute.get
getConfig.lower
time.time.str.replace
self.size_raw
download.aria_download
reply_message.update.message.context.bot.auto_delete_message.threading.Thread.start
bot.LOGGER.error
google.oauth2.service_account.Credentials.from_service_account_file
self.__service.permissions
editMessage
self.cloneFolder
random.randrange
requests.session.post
_enable_services
iam.projects.serviceAccounts.keys.create
googleapiclient.discovery.build.services
bot.app.send_photo
bot.helper.mirror_utils.download_utils.mega_download.MegaDownloader.add_download
bot.helper.mirror_utils.status_utils.split_status.SplitStatus
bot.SUDO_USERS.add
link.urlparse._replace
reply_message.update.message.bot.auto_delete_message.threading.Thread.start
logging.info
_get_projects.append
ydl.prepare_filename.split
self.telegraph.edit_page
self.aria_download.download_speed_string
bot.helper.mirror_utils.status_utils.extract_status.ExtractStatus
tarfile.open
requests.get
name.replace.replace
subprocess.run
serviceaccountfactory.rfind
str_1.str.split
bot.helper.mirror_utils.upload_utils.gdriveTools.GoogleDriveHelper.download
solidfiles
magic.Magic
serviceaccountfactory
threading.Lock
reply_to.text.strip.startswith
self.__onDownloadComplete
random.SystemRandom
IS_TEAM_DRIVE.lower.lower
progress.bar.Bar
reply_to.text.strip.strip
page.find.get
self.action
self.updater.cancel
os.mkdir
pickle.load
bot.helper.mirror_utils.status_utils.tg_upload_status.TgUploadStatus
self.__service.files.delete
tarfile.open.close
psutil.cpu_percent
self.__service.files.get
m_path.os.remove.threading.Thread.start
bot.download_dict.values
link.split.split
googleapiclient.http.MediaIoBaseDownload.next_chunk
bot.aria2.get_download
DRIVE_NAME.append
frmt.get
bot.AS_MEDIA_USERS.add
service.projects.list
err.last_attempt.exception
self.__service.files.copy
yt_dlp.YoutubeDL
self.__listener.onUploadComplete
self.download_folder
des_dir.Image.open.convert
dl.status
bot.app.send_document
re.findall.split
bot.helper.ext_utils.bot_utils.is_gdrive_link
parse.add_argument_group.add_argument
bot.sendMessage
range
f.read
tarfile.open.add
PIL.Image.open.resize
app.export_session_string
response.self.__service.files.get.execute
sys.exit
argparse.ArgumentParser.add_argument_group
bot.helper.telegram_helper.button_build.ButtonMaker.sbutton
service.projects.serviceAccounts.create
download.status
os.path.isdir
bot.helper.mirror_utils.download_utils.direct_link_generator.direct_link_generator
self.__service.files.get.execute
query.parent_id.self.__service.files.list.execute
psycopg2.connect
_AuthorizedUserFilter
self.sent_msg.reply_photo
js_content.str.split
hachoir.metadata.extractMetadata.get
i.str.zfill
input
self.__listener.onDownloadComplete
line.strip.split.replace
onedrive
self.user_settings
googleapiclient.http.MediaFileUpload
bot.helper.mirror_utils.download_utils.direct_link_generator.direct_link_generator.strip
api.format
download.path
current_key_dump.append
self.connect
i.cloud.operations.get.execute

@developer
Could please help me check this issue?
May I pull a request to fix it?
Thank you very much.

Error: UnzipMirror

Hy bhula ye bot tho badiya chal rha ha par unzipmirror nahi ho rha bhula

CONFIG FILE URL

Ability to load config.env file by providing it , using gist github.com , it'll will be easy to just edit the gist file , then just restart the bot , because now I have to edit the file then build the image again to make changes on the config

ERROR

root@sonzai-x:/mirrorbot137# sudo docker run mirror-bot
2023-01-22 14:27:27,545 - root - INFO - Initializing Aria2c
2023-01-22 14:27:28,045 - bot - INFO - Generating USER_SESSION_STRING
Initiliazing Library with API_KEY: Tg5DiAya
2023/01/22 14:27:28 Serving on :6090
[GIN] 2023/01/22 - 14:27:35 | 200 | 4.00242838s | 127.0.0.1 | POST "/login"
Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 185, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/usr/lib/python3.8/runpy.py", line 144, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/usr/lib/python3.8/runpy.py", line 111, in _get_module_details
import(pkg_name)
File "/usr/src/app/bot/init.py", line 465, in
updater = tg.Updater(token=BOT_TOKEN)
TypeError: init() got an unexpected keyword argument 'token'
Exception ignored in: <function ClientSession.del at 0x7f2906f61c10>
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/aiohttp/client.py", line 347, in del
File "/usr/lib/python3.8/asyncio/base_events.py", line 1740, in call_exception_handler
File "/usr/lib/python3.8/logging/init.py", line 1475, in error
File "/usr/lib/python3.8/logging/init.py", line 1589, in _log
File "/usr/lib/python3.8/logging/init.py", line 1599, in handle
File "/usr/lib/python3.8/logging/init.py", line 1661, in callHandlers
File "/usr/lib/python3.8/logging/init.py", line 954, in handle
File "/usr/lib/python3.8/logging/init.py", line 1186, in emit
File "/usr/lib/python3.8/logging/init.py", line 1176, in _open
NameError: name 'open' is not defined
root@sonzai-x:/mirrorbot137#

error

File "/usr/src/app/bot/main.py", line 138, in

2021-10-20T14:20:35.238221+00:00 app[web.1]: (f"{BotCommands.UnZipLeechCommand}", "Start leeching and upload as .zip"),

2021-10-20T14:20:35.238222+00:00 app[web.1]: AttributeError: '_BotCommands' object has no attribute 'UnZipLeechCommand'

2021-10-20T14:21:10.897321+00:00 heroku[web.1]: State changed from starting to down

2021-10-20T14:21:12.031491+00:00

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.