Git Product home page Git Product logo

telegram-downloader-bot's Introduction

Telegram-Downloader-Bot

Description:

This program is specifically used to download media to the computer folder where this program is installed. It can be moidifed to save the media in specific folder which user wants to. Once this program is started the downloader bot is the chat where we need to forward any media which needs to be dowloaded. As soon as you forward the message, bot will give you the option to download it.

YouTube links:

Youtube links can directly be used to either save the link as video or audio. Once you share the link in this bot, it will ask you the relevant options.

Pre-requisites:

  • Downloader Bot needs to be created before using this code
  • Another Test Bot (optional) to be used for testing certain codes. It can be ignored. If not used, make sure to comment the test bot functions from telegrambot.py file.

Library Dependencies:

  • telethon (pip install telethon)
  • asyncio
  • time
  • datetime
  • pytube (pip install pytube)
  • ffmpeg((pip install ffmpeg)
  • sys
  • os
  • re
  • logging (optional)
  • cryptg (pip install cryptg)

Notes:

  • Installing cryptg will increase the download speed significantly and is recommended.
  • userdata-dummy.py is the dummy file for the actual userdata.py file that should be customized based on personal data. Use the dummy file to build your own userdata.py file

Userdata_Dummy.py Explained:

Please rename the file to userdata.py once the file has been edited with personal data.

#Bot Details - Sensitive Data

api_id = "User Telegram API"

api_hash = "User Telegram Hash"

downloader_bot_api = "User Telegram Downloader Bot API"

bot_test_api = "User Telegram API" # Optional

##Usernames

client_username = "User Telegram Username"

downloader_bot_username = "User Telegram Downloader Bot Username"

test_bot_username = "User Telegram Test Bot Username" # Optional

##Chat Names (Optional - If not used, remove the functions from telegrambot.py)

album_chats = ["username1","username1","username1"] # Usernames of chats from which albums can be forwarded

forward_chat = "useranme_of_group/channel" # Username of group/channel where to forward the albums from above chats

##Personal Array (Optional)

classic_array = ["option1","option2","option3"] # Classic Array for extra options to be used for user defined logic

##Personal Keyboard (Optional - To be used if above classic array is used)

from telethon import Button async def classic_keyboard_fn(event): classic_keyboard = [ [Button.inline('OP1', data=f'OP1_{event.query.data}'), Button.inline('OP2', data=f'OP2_{event.query.data}'), Button.inline('OP3', data=f'OP3_{event.query.data}')]] return classic_keyboard

telegram-downloader-bot's People

Contributors

hardkothari avatar

Stargazers

Yash Thaker avatar

Watchers

 avatar

Forkers

dsynr

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.