{"id":13989146,"url":"https://github.com/uk0/telethon_get_media","last_synced_at":"2025-04-13T14:13:09.433Z","repository":{"id":37741978,"uuid":"305138714","full_name":"uk0/telethon_get_media","owner":"uk0","description":"Telegram download media |  Telegram 下载群聊天的文件以及视频等内容。｜ Telegram 爬虫 ｜ tg 爬虫","archived":false,"fork":false,"pushed_at":"2023-02-13T04:42:09.000Z","size":26,"stargazers_count":185,"open_issues_count":0,"forks_count":31,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-13T14:13:05.065Z","etag":null,"topics":["telegram","telegram-api","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/uk0.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-10-18T15:54:02.000Z","updated_at":"2025-04-13T08:23:26.000Z","dependencies_parsed_at":"2024-01-18T04:09:09.312Z","dependency_job_id":"88fe229a-c963-442a-99df-418be83d5f48","html_url":"https://github.com/uk0/telethon_get_media","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/uk0%2Ftelethon_get_media","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uk0%2Ftelethon_get_media/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uk0%2Ftelethon_get_media/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uk0%2Ftelethon_get_media/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uk0","download_url":"https://codeload.github.com/uk0/telethon_get_media/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248724628,"owners_count":21151561,"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":["telegram","telegram-api","telegram-bot"],"created_at":"2024-08-09T13:01:32.312Z","updated_at":"2025-04-13T14:13:09.390Z","avatar_url":"https://github.com/uk0.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"## telethon_get_media\n\n\n### 分享文件相关\n\n* 可以通过 https://github.com/uk0/file_encryption 加密后自释放分享 ：）Safe\n\n### 当前版本\n\n* beta 1.0.0 \n\n#### 功能\n\n* 1.下载 Telegram 历史Media [频道id里面有自己改一下] `main.py`\n\n* 2.实时下载所有频道里面的 Media [自己加入的所有频道] `rt.py`\n\n\n#### Env Python 3.6 \n\n   * telethon\n   * socks  ` pip install PySocks`\n   * asyncio\n      \n\n#### 说明\n\n```bash\n\n#1 https://my.telegram.org/auth 输入手机号申请 APIID\n\n#2.直接把自己的API KEY 写入进去 运行程序会让你输入手机号，以及验证码。\n\n#3.第一次需要输入手机号 停止后在启动不需要了就。\n\n#4.纯属无聊。。。。。\n\n```\n\n#### quick start\n\n* 修改配置文件\n\n  \u003e `DELETE_DUP` 现在没有使用\n\n  \u003e 自己创建一个名字=`zh_cn.config`的文件和python脚本同级将以下内容稍作修改写入即可\n\n```config\n[message_download]\nPIC_DIR=/Users/firshme/Desktop/tmp\nDATA_DIR=/Users/firshme/Desktop/tmp\nDELETE_DUP=AUTO  \nAPI_ID=100851\nAPI_HASH=464f1f154c34c1f93057f3be\nTG_AUTH_FILE_NAME=auto_download\nPROXY_ADDR=127.0.0.1\nPROXY_PORT=1089\n```\n\n\n* 安装依赖\n\n```bash\npip install telethon\npip install PySocks\n```\n\n* 启动\n\n```bash\nsudo -u root /opt/miniconda3/bin/python3 main.py\n\n```\n\n\n\n* 启动后 console \n\n```bash\n(Press Ctrl+C to stop this)\nhandler init success\ndownload - /volume5/green_hdd/pysuper/telethon_get_media/data/2022-07-06/XfBFEXrBc18TJL9XjU4zcI\nhandler init success\ndownload - /volume5/green_hdd/pysuper/telethon_get_media/data/2022-07-06/xIbFtL3zpDjImhujE8IaWX\nhandler init success\ndownload - /volume5/green_hdd/pysuper/telethon_get_media/data/2022-07-06/DdNU5sqUv3B771R1Yr5aZt\nhandler init success\ndownload - /volume5/green_hdd/pysuper/telethon_get_media/data/2022-07-06/UYH1CzsvgTQzyuTB2gjlKt\nhandler init success\ndownload - /volume5/green_hdd/pysuper/telethon_get_media/data/2022-07-06/EcdhKSMTszWYFLtYlMdUGL\nhandler init success\ndownload - /volume5/green_hdd/pysuper/telethon_get_media/data/2022-07-06/vm6Fbx1o1QR3u2VcpTK9HP\nhandler init success\ndownload - /volume5/green_hdd/pysuper/telethon_get_media/data/2022-07-06/Wx1wj1BSmQTkdzne5nVehG\nhandler init success\ndownload - /volume5/green_hdd/pysuper/telethon_get_media/data/2022-07-06/5hyks1pWPE5yt0ACuyyc3g\nhandler init success\ndownload - /volume5/green_hdd/pysuper/telethon_get_media/data/2022-07-06/5NqBudIhSLFeNGHdphxSPj\nhandler init success\ndownload - /volume5/green_hdd/pysuper/telethon_get_media/data/2022-07-06/JIDBfFvplFxMA2ruXyaGb5\n\n\n# 查看文件夹\nadmin@DS918:/volume5/green_hdd/pysuper/telethon_get_media/data/2022-07-06$ ls -al\ntotal 84920\ndrwxr-xr-x 2 root  root      4096 Jul  6 23:34 .\ndrwxr-xr-x 3 admin users     4096 Jul  6 23:26 ..\n-rw-r--r-- 1 root  root     22599 Jul  6 23:34 FrB1elMKv84c7pGQr7Dkmi.jpg\n-rw-r--r-- 1 root  root  16908288 Jul  6 23:34 UYH1CzsvgTQzyuTB2gjlKt_QMYxxx1271124695396634624-20200612_005838-vid1.mp4\n-rw-r--r-- 1 root  root  55574528 Jul  6 23:34 vm6Fbx1o1QR3u2VcpTK9HP_xxxxxxxxxx.mp4\n-rw-r--r-- 1 root  root  14417920 Jul  6 23:34 Wx1wj1BSmQTkdzne5nVehG_xxxxxxx.mp4\n\n```\n\n\n#### show_groupby.sh 使用\n\n```bash\nsh show_groupby.sh /path/to/dir\n\n# 例如\nadmin@DS918:/volume5/green_hdd/pysuper/telethon_get_media$ sh show_groupby.sh /volume5/green_hdd/pysuper/telethon_get_media/data/2022-07-06\n         468KiB   11 jpg\n         699MiB    7 mp4\n```\n\n\n\n#### happy continue\n\n* 先给个`✨`直接提问题即可看到就会修改。\n\n#### tools\n\n* 里面都是测试写的统计脚本和工具之前在arm里面跑的 后面整合以后在删除吧。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuk0%2Ftelethon_get_media","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuk0%2Ftelethon_get_media","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuk0%2Ftelethon_get_media/lists"}