A Telegram mirror bot which can be deployed using Heroku.

Overview

Slam

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 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.
  • Clone this repo:
git clone https://github.com/breakdowns/slam-mirrorbot mirrorbot/
cd mirrorbot
  • 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 file (token.pickle) for Google Drive:
pip install google-api-python-client google-auth-httplib2 google-auth-oauthlib
python3 generate_drive_token.py

Deployment

Fork this repo, than upload credentials.json and token.pickle to your forks

Deploy to Heroku

Features supported:

  • Mirroring direct download links to Google Drive
  • Mirroring Mega.nz links to Google Drive (In development stage)
  • Mirroring Uptobox.com links to Google Drive (Uptobox account must be premium)
  • Copy files from someone's drive to your drive (Using Autorclone)
  • Download/upload progress
  • Download/upload speeds and ETAs
  • Docker support
  • Uploading To Team Drives.
  • Index Link support
  • Service account support
  • Mirror all youtube-dl supported links
  • Mirror telegram files
  • Delete files from drive
  • Add stickers to your pack
  • Nyaa.si and Sukebei Torrent search
  • Shell and Executor
  • Index Link support
  • Shortener support
  • Custom Buttons
  • Speedtest with picture results
  • 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.

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.

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

Credits

Thanks to:

and many more people who aren't mentioned here, but may be found in Contributors.

Comments
  • bot: Change deploy method

    bot: Change deploy method

    • change deploy method to heroku container registry
    • for now, we no need HEROKU_EMAIL in github secrets
    • update credits

    Signed-off-by: GudMeong [email protected]

    opened by gudmeong 5
  • Undefined name: pe --> pw

    Undefined name: pe --> pw

    $ flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics

    ./slam-mirrorbot/bot/helper/mirror_utils/download_utils/direct_link_generator.py:351:39: F821 undefined name 'pe'
            req = requests.post(url, data=pe)
                                          ^
    1     F821 undefined name 'pe'
    1
    
    opened by cclauss 2
  • added proxy support

    added proxy support

    added proxy support for watch command (for personal use,might have to modify to make it usable)(im a noob) , you have to use /watch [youtube-dl supported link] [quality] |[CustomName] | [http://username:[email protected]:port/]

    other usable methods ex - http(s)://PROXY_URL:PROXY_PORT socks5://127.0.0.1:1080

    opened by eXtizi 2
  • Sourcery refactored master branch

    Sourcery refactored master branch

    Branch master refactored by Sourcery.

    If you're happy with these changes, merge this Pull Request using the Squash and merge strategy.

    See our documentation here.

    Run Sourcery locally

    Reduce the feedback loop during development by using the Sourcery editor plugin:

    Review changes via command line

    To manually merge these changes, make sure you're on the master branch, then run:

    git fetch origin sourcery/master
    git merge --ff-only FETCH_HEAD
    git reset HEAD^
    

    Help us improve this pull request!

    opened by sourcery-ai[bot] 1
  • Sourcery refactored master branch

    Sourcery refactored master branch

    Branch master refactored by Sourcery.

    If you're happy with these changes, merge this Pull Request using the Squash and merge strategy.

    See our documentation here.

    Run Sourcery locally

    Reduce the feedback loop during development by using the Sourcery editor plugin:

    Review changes via command line

    To manually merge these changes, make sure you're on the master branch, then run:

    git fetch origin sourcery/master
    git merge --ff-only FETCH_HEAD
    git reset HEAD^
    

    Help us improve this pull request!

    opened by sourcery-ai[bot] 1
Releases(v5.2)
  • v5.2(Sep 22, 2021)

  • v5.1(Sep 4, 2021)

  • v5.0(Aug 7, 2021)

  • v4.8.7(Jun 19, 2021)

    • Tar/Unzip G-Drive Links Support
    • Fix overall download speed for Mega and others
    • Add shell custom command
    • Add Set Variable, Delete Variable, and Bot Info Menu (Only for Heroku)
    • Add Updater for update Bot from upstream
    • Torrent Search: Add 1337x, piratebay, tgx, yts, eztv, torlock, rarbg support

    NOTE: Please Redeploy

    Source code(tar.gz)
    Source code(zip)
  • v4.8.6(Jun 14, 2021)

    • direct_link_generator: add letsupload.io, feurl.com, pixeldrain.com support
    • Block Drive & YouTube link using /mirror command
    • Remove anime & stickers module, because not related in mirror bot
    • Some update in aria.sh
    • Tidying Up

    NOTE: Refroks & Redeploy Recommended.

    Source code(tar.gz)
    Source code(zip)
  • v4.8.4(Jun 8, 2021)

    • Added support for tar.xz
    • Fix Mega auto canceling if deleted file
    • Direct link generator: Addad Naniplay.com, Naniplay.nanime.in, Naniplay.nanime.biz, Sbembed.com, Streamsb.net support
    Source code(tar.gz)
    Source code(zip)
  • v4.8.3(Jun 5, 2021)

  • v4.8.2(Jun 4, 2021)

    • direct link generator: Added Hxfile, Anonfiles, Fembed (femax20 & layarkacaxxi), Onedrive (Only works for file not folder for now, thanks to UsergeTeam) support
    • aria: Added more tracker
    Source code(tar.gz)
    Source code(zip)
  • v4.8.1(May 31, 2021)

  • v4.8.0(May 30, 2021)

  • v4.7.6(May 18, 2021)

  • v4.7.5(May 17, 2021)

    • Added sudo using database NOTE: redeploy recommended to generating database, or you can go to your herokuapp > resources > add-ons > then serach Heroku Postgres > hit Submit Order Form. Done Database will automatic come in config vars
    • mirror: Fix for uploading telegram file_name of None type
    • gdriveTools: Fix infinite loop when hitting rate limits
    Source code(tar.gz)
    Source code(zip)
  • v4.6.9(Apr 26, 2021)

  • v4.6.6(Apr 18, 2021)

    • direct_links: Added racaty.net support
    • Update support group link
    • Fix Index URL encode problem
    • Added support for password protected index links by magneto
    Source code(tar.gz)
    Source code(zip)
  • v4.6.3(Apr 12, 2021)

  • v4.6.2(Apr 8, 2021)

  • v4.6(Mar 29, 2021)

  • v4.4(Mar 22, 2021)

  • v4.2(Mar 17, 2021)

  • v3.8(Mar 9, 2021)

  • v3.7(Mar 6, 2021)

  • v3.0(Mar 3, 2021)

    • Added auto generate Telegraph Token
    • Added Inline Buttons
    • Update /stats command
    • /list module will post search result on telegra.ph
    • Speedtest
    Source code(tar.gz)
    Source code(zip)
Python Telegram bot api.

pyTelegramBotAPI A simple, but extensible Python implementation for the Telegram Bot API. Getting started. Writing your first bot Prerequisites A simp

FrankWang 6.4k Jan 09, 2023
A ideia é fornecer uma base ampla de questões do ENEM como uma api REST

base10 "A ideia é fornecer uma base ampla de questões do ENEM como uma api REST" TODO Documentar a api com apifairy Criar testes Criar crawler para si

Wadson Garbes 4 Apr 24, 2022
Async ready API wrapper for Revolt API written in Python.

Mutiny Async ready API wrapper for Revolt API written in Python. Installation Python 3.9 or higher is required To install the library, you can just ru

16 Mar 29, 2022
A file-based quote bot written in Python

Let's Write a Python Quote Bot! This repository will get you started with building a quote bot in Python. It's meant to be used along with the Learnin

1 Jan 15, 2022
Maestral is an open-source Dropbox client written in Python.

Maestral - A light-weight and open-source Dropbox client for macOS and Linux

2.6k Jan 03, 2023
A script that writes automatic instagram comments under a post

Send automatic messages under a post on instagram Instagram will rate limit you after some time. From there on you can only post 1 comment every 40 se

Maximilian Freitag 3 Apr 28, 2022
A Flask & Twilio Secret Santa app.

🎄 ✨ Secret Santa Twilio ✨ 📱 A contactless Secret Santa game built with Python, Flask and Twilio! Prerequisites 📝 A Twilio account. Sign up here ngr

Sangeeta Jadoonanan 5 Dec 23, 2021
RequestTrackerBot - Request Tracker Bot With Python

Request Tracker Bot This is a Request Tracker Bot repo, It is for those who uplo

Prince Jaiswal 1 Dec 30, 2021
Working TikTok Username Auto-Claimer/Sniper/Swapper which will autoclaim username if it´s available

TikTok-AutoClaimer Working TikTok Username Auto-Claimer/Sniper/Swapper which will autoclaim username if it´s available Usage Python 3.6 or above is re

Kevin 18 Dec 08, 2022
TheTimeMachine - Weaponizing WaybackUrls for Recon, BugBounties , OSINT, Sensitive Endpoints and what not

The Time Machine - Weaponizing WaybackUrls for Recon, BugBounties , OSINT, Sensi

Anmol K Sachan 112 Dec 29, 2022
A Discord Self-Bot in Python

👨‍💻 Discord Self Bot 👨‍💻 A Discord Self-Bot in Python by natrix Installation Run: selfbot.bat Python: version : 3.8 Modules

natrix_dev 3 Oct 02, 2022
Create a roles overview page for all Ansible roles/playbooks in Gitlab

ansible-create-roles-overview Overview The script ./create_roles_overview.py queries a Gitlab API for Ansible roles and playbooks. It will iterate ove

2 Oct 11, 2021
Bot interpretation of the carbon.now.sh site

📒 Source code of the @PicodeBot 🧸 Developer: @hoosnick Run $ git clone https://github.com/hoosnick/picodebot.git $ pip install -r requirements.txt P

Husniddin Murodov 13 Oct 02, 2022
A tiktok autoclaimer/sniper used to get og/rare usernames on tiktok.com

TikTok Autoclaimer A tiktok autoclaimer/sniper used to get og/rare usernames on tiktok.com Report Bug · Request Feature Features Asynchronous User fri

dropout 24 Dec 08, 2022
Python Dialogflow CX Scripting API (SCRAPI)

Python Dialogflow CX Scripting API (SCRAPI) A high level scripting API for bot builders, developers, and maintainers. Table of Contents Introduction W

Google Cloud Platform 39 Dec 09, 2022
b2blaze

b2blaze Welcome to the b2blaze library for Python. Backblaze B2 provides the cheapest cloud object storage and transfer available on the internet. Com

George Sibble 603 Jan 03, 2023
Discord Token Finder - Find half of your target's token with just their ID.

Discord Token Finder - Find half of your target's token with just their ID.

Ttawi 2 Apr 07, 2022
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 03, 2023
Track live sentiment for stocks from Reddit and Twitter and identify growing stocks

Market Sentiment About This repository can mainly be used for two things. a. Tracking the live sentiment of stocks from Reddit and Twitter b. Tracking

Market Sentiment 345 Dec 17, 2022
Telegram Bot that's allow you to play Video & Music on Telegram Group Video Chat

WAR MUSIC / VIDEO PLAYER Bot Bot Link: 🧪 Get SESSION_NAME from below: Pyrogram 🎭 Preview ✨ Features Music & Video stream support MultiChat support P

Abhishek singh 11 Dec 25, 2022