{"id":18300522,"url":"https://github.com/dheison0/telegram-downloader","last_synced_at":"2025-04-05T14:30:40.233Z","repository":{"id":57760387,"uuid":"524979308","full_name":"dheison0/telegram-downloader","owner":"dheison0","description":"Telegram bot for downloading files without a graphical session running","archived":false,"fork":false,"pushed_at":"2025-02-21T14:05:47.000Z","size":29,"stargazers_count":12,"open_issues_count":0,"forks_count":6,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-21T05:32:49.655Z","etag":null,"topics":["bot","docker","pyrogram","python","telegram-bot"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dheison0.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-15T12:31:58.000Z","updated_at":"2025-02-25T14:30:10.000Z","dependencies_parsed_at":"2024-11-05T15:13:15.046Z","dependency_job_id":"262a65f6-20ce-496f-af02-b58ddacd4aa5","html_url":"https://github.com/dheison0/telegram-downloader","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dheison0%2Ftelegram-downloader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dheison0%2Ftelegram-downloader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dheison0%2Ftelegram-downloader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dheison0%2Ftelegram-downloader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dheison0","download_url":"https://codeload.github.com/dheison0/telegram-downloader/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247352196,"owners_count":20925223,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","docker","pyrogram","python","telegram-bot"],"created_at":"2024-11-05T15:12:42.936Z","updated_at":"2025-04-05T14:30:40.224Z","avatar_url":"https://github.com/dheison0.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[Pyrogram Framework]: \u003chttps://github.com/pyrogram/pyrogram\u003e\n[My Telegram]: \u003chttps://my.telegram.org\u003e\n[BotFather]: \u003chttps://t.me/BotFather\u003e\n\n\n# Telegram downloader\n\nThis is a *simple* bot to download telegram files directly to your own server\nwithout needing to keep telegram open or using telegram-cli, this uses Telegram's\nMTProto protocol to download files up to 4GB using the [Pyrogram Framework].\n\n## Setup\n\nTo setup this bot on your own server you'll need a Telegram API ID/Hash, it can be\ncreated at [My Telegram] website, do this before continue\n\nIf you want to run this bot on a docker server follow [Environment variables](#Environment%20variables)\nguide and then [Docker install](#Docker%20install) guide.\n\n## Install dependencies\n\nTo install all needed dependencies use pip:\n\n```bash\npython3 -m pip install -r requirements.txt\n```\n\nIf you have any issue, try to install build-essentials in your system, the `psutil`\nlib sometimes needs to be builded locally.\n\n## Environment variables\n\nObservation: *This bot support dot files(`.env`)*\n\nNow that you've your own ID/Hash it has to be passed to `TELEGRAM_API_ID` and\n`TELEGRAM_API_HASH` environment variables, you also need to set the bot token(create\none [here][BotFather]) as `BOT_TOKEN`, and if you want to download files from channels\nthat doesn't allow forwarding/copying content you need to set `PHONE_NUMBER` with your\nnumber that is used on a telegram account that is allowed to access the content you want\nto download.\n\nThe default **download** folder is `/data`, if you want to set another location define that\nas `DOWNLOAD_FOLDER`, default **session** storage path is `/config` but it can be set by\n`CONFIG_FOLDER`, this can be usefull for saving session across updates.\n\nYou also need to set the bot administrator list using `ADMINS`, use spaces to separate\neveryone.\n\n## Running\n\nTo run this bot it has to be started as a module, to this use `-m` flag:\n\n```bash\npython3 -m bot\n```\n\nWhen you wanna stop the bot, press CTRL+\\\\\n\n## Docker run\n\nThis bot is so simple that you only need to set some environment variables and mount a\nfolder inside the container to keep your downloads, for this, use this command replacing\nvalues with your owns:\n\n```bash\n# Build a docker image to your own server\ndocker build -t telegram-downloader .\n\n# Now run this\ndocker run \\\n    -it `# optional, use -d if you won't use your account to download content` \\\n    -v /home/$USER/TDownloader/data:/data \\\n    -v /home/$USER/TDownloader/config:/config \\\n    -e TELEGRAM_API_ID=123456 \\\n    -e TELEGRAM_API_HASH=\"yourTelegramAPIHash\" \\\n    -e BOT_TOKEN=\"yourBotToken\" \\\n    -e PHONE_NUMBER=\"yourPhoneNumber\" `# optional` \\\n    -e ADMINS=\"@yourTelegramUsername\" \\\n    telegram-downloader\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdheison0%2Ftelegram-downloader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdheison0%2Ftelegram-downloader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdheison0%2Ftelegram-downloader/lists"}