Giter Site home page Giter Site logo

tangyoha / telegram_media_downloader Goto Github PK

View Code? Open in Web Editor NEW
2.2K 2.2K 254.0 1.37 MB

基于Dineshkarthik的项目, 电报视频下载,电报资源下载,跨平台,支持web查看下载进度 ,支持bot下发指令下载,支持下载已经加入的私有群但是限制下载的资源, telegram media download,Download media files from a telegram conversation/chat/channel up to 2GiB per file

License: MIT License

Makefile 0.09% Python 39.52% HTML 2.05% Dockerfile 0.10% JavaScript 58.23%
cosplatfrom cross-platform downloader flask media-downloader telegram-bot

telegram_media_downloader's Introduction

Telegram Media Downloader

Unittest Coverage Status License: MIT Code style: black Code style: black

Overview

Support two default running

  • The robot is running, and the command download or forward is issued from the robot

  • Download as a one-time download tool

UI

Web page

After running, open a browser and visit localhost:5000 If it is a remote machine, you need to configure web_host: 0.0.0.0

Code style: black

Robot

Need to configure bot_token, please refer to Documentation

Code style: black

Support

Category Support
Language Python 3.7 and above
Download media types audio, document, photo, video, video_note, voice

Version release plan

Installation

For *nix os distributions with make availability

git clone https://github.com/tangyoha/telegram_media_downloader.git
cd telegram_media_downloader
make install

For Windows which doesn't have make inbuilt

git clone https://github.com/tangyoha/telegram_media_downloader.git
cd telegram_media_downloader
pip3 install -r requirements.txt

Docker

For more detailed installation tutorial, please check the wiki

Make sure you have docker and docker-compose installed

docker pull tangyoha/telegram_media_downloader:latest
mkdir -p ~/app && mkdir -p ~/app/log/ && cd ~/app
wget https://raw.githubusercontent.com/tangyoha/telegram_media_downloader/master/docker-compose.yaml -O docker-compose.yaml
wget https://raw.githubusercontent.com/tangyoha/telegram_media_downloader/master/config.yaml -O config.yaml
wget https://raw.githubusercontent.com/tangyoha/telegram_media_downloader/master/data.yaml -O data.yaml
# vi config.yaml and docker-compose.yaml
vi config.yaml

# The first time you need to start the foreground
# enter your phone number and code, then exit(ctrl + c)
docker-compose run --rm telegram_media_downloader

# After performing the above operations, all subsequent startups will start in the background
docker-compose up -d

# Upgrade
docker pull tangyoha/telegram_media_downloader:latest
cd ~/app
docker-compose down
docker-compose up -d

Upgrade installation

cd telegram_media_downloader
pip3 install -r requirements.txt

Configuration

All the configurations are passed to the Telegram Media Downloader via config.yaml file.

Getting your API Keys: The very first step requires you to obtain a valid Telegram API key (API id/hash pair):

  1. Visit https://my.telegram.org/apps and log in with your Telegram Account.
  2. Fill out the form to register a new Telegram application.
  3. Done! The API key consists of two parts: api_id and api_hash.

Getting chat id:

1. Using web telegram:

  1. Open https://web.telegram.org/?legacy=1#/im

  2. Now go to the chat/channel and you will see the URL as something like

    • https://web.telegram.org/?legacy=1#/im?p=u853521067_2449618633394 here 853521067 is the chat id.
    • https://web.telegram.org/?legacy=1#/im?p=@somename here somename is the chat id.
    • https://web.telegram.org/?legacy=1#/im?p=s1301254321_6925449697188775560 here take 1301254321 and add -100 to the start of the id => -1001301254321.
    • https://web.telegram.org/?legacy=1#/im?p=c1301254321_6925449697188775560 here take 1301254321 and add -100 to the start of the id => -1001301254321.

2. Using bot:

  1. Use @username_to_id_bot to get the chat_id of
    • almost any telegram user: send username to the bot or just forward their message to the bot
    • any chat: send chat username or copy and send its joinchat link to the bot
    • public or private channel: same as chats, just copy and send to the bot
    • id of any telegram bot

config.yaml

api_hash: your_api_hash
api_id: your_api_id
chat:
- chat_id: telegram_chat_id
  last_read_message_id: 0
  download_filter: message_date >= 2022-12-01 00:00:00 and message_date <= 2023-01-17 00:00:00
- chat_id: telegram_chat_id_2
  last_read_message_id: 0
# note we remove ids_to_retry to data.yaml
ids_to_retry: []
media_types:
- audio
- document
- photo
- video
- voice
- animation #gif
file_formats:
  audio:
  - all
  document:
  - pdf
  - epub
  video:
  - mp4
save_path: D:\telegram_media_downloader
file_path_prefix:
- chat_title
- media_datetime
upload_drive:
  # required
  enable_upload_file: true
  # required
  remote_dir: drive:/telegram
  # required
  upload_adapter: rclone
  # option,when config upload_adapter rclone then this config are required
  rclone_path: D:\rclone\rclone.exe
  # option
  before_upload_file_zip: True
  # option
  after_upload_file_delete: True
hide_file_name: true
file_name_prefix:
- message_id
- file_name
file_name_prefix_split: ' - '
max_download_task: 5
web_host: 127.0.0.1
web_port: 5000
language: EN
web_login_secret: 123
allowed_user_ids:
- 'me'
date_format: '%Y_%m'
enable_download_txt: false
  • api_hash - The api_hash you got from telegram apps
  • api_id - The api_id you got from telegram apps
  • bot_token - Your bot token
  • chat - Chat list
    • chat_id - The id of the chat/channel you want to download media. Which you get from the above-mentioned steps.
    • download_filter - Download filter, see How to use Filter
    • last_read_message_id - If it is the first time you are going to read the channel let it be 0 or if you have already used this script to download media it will have some numbers which are auto-updated after the scripts successful execution. Don't change it.
    • ids_to_retry - Leave it as it is. This is used by the downloader script to keep track of all skipped downloads so that it can be downloaded during the next execution of the script.
  • media_types - Type of media to download, you can update which type of media you want to download it can be one or any of the available types.
  • file_formats - File types to download for supported media types which are audio, document and video. Default format is all, downloads all files.
  • save_path - The root directory where you want to store downloaded files.
  • file_path_prefix - Store file subfolders, the order of the list is not fixed, can be randomly combined.
    • chat_title - Channel or group title, it will be chat id if not exist title.
    • media_datetime - Media date.
    • media_type - Media type, also see media_types.
  • upload_drive - You can upload file to cloud drive.
    • enable_upload_file - Enable upload file, default false.
    • remote_dir - Where you upload, like drive_id/drive_name.
    • upload_adapter - Upload file adapter, which can be rclone, aligo. If it is rclone, it supports all rclone servers that support uploading. If it is aligo, it supports uploading Ali cloud disk.
    • rclone_path - RClone exe path, see How to use rclone
    • before_upload_file_zip - Zip file before upload, default false.
    • after_upload_file_delete - Delete file after upload success, default false.
  • file_name_prefix - Custom file name, use the same as file_path_prefix
    • message_id - Message id
    • file_name - File name (may be empty)
    • caption - The title of the message (may be empty)
  • file_name_prefix_split - Custom file name prefix symbol, the default is -
  • max_download_task - The maximum number of task download tasks, the default is 5.
  • hide_file_name - Whether to hide the web interface file name, default false
  • web_host - Web host
  • web_port - Web port
  • language - Application language, the default is English (EN), optional ZH(Chinese),RU,UA
  • web_login_secret - Web page login password, if not configured, no login is required to access the web page
  • log_level - see logging._nameToLevel.
  • forward_limit - Limit the number of forwards per minute, the default is 33, please do not modify this parameter by default.
  • allowed_user_ids - Who is allowed to use the robot? The default login account can be used. Please add single quotes to the name with @.
  • date_format Support custom configuration of media_datetime format in file_path_prefix.see python-datetime
  • enable_download_txt Enable download txt file, default false

Execution

python3 media_downloader.py

All downloaded media will be stored at the root of save_path. The specific location reference is as follows:

The complete directory of video download is: save_path/chat_title/media_datetime/media_type. The order of the list is not fixed and can be randomly combined. If the configuration is empty, all files are saved under save_path.

Proxy

socks4, socks5, http proxies are supported in this project currently. To use it, add the following to the bottom of your config.yaml file

proxy:
  scheme: socks5
  hostname: 127.0.0.1
  port: 1234
  username: your_username(delete the line if none)
  password: your_password(delete the line if none)

If your proxy doesn’t require authorization you can omit username and password. Then the proxy will automatically be enabled.

Contributing

Contributing Guidelines

Read through our contributing guidelines to learn about our submission process, coding rules and more.

Want to Help?

Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our guidelines for contributing.

Code of Conduct

Help us keep Telegram Media Downloader open and inclusive. Please read and follow our Code of Conduct.

Sponsor

PayPal

Code style: black Code style: black

telegram_media_downloader's People

Contributors

dahai9 avatar dependabot-preview[bot] avatar dependabot[bot] avatar dineshkarthik avatar lqlsoftware avatar lxy1226 avatar tangyoha avatar teomit 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  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  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  avatar  avatar  avatar  avatar

telegram_media_downloader's Issues

[Feature]: 在web监控页面添加一个重启服务的按钮。

Description

如题:在web监控页面除了“暂停‘按钮,添加一个“重启服务”的按钮,方便在连接服务器的情况下停止服务并重新开始。

Suggested Solution

点击”重启服务“后,首先需要弹出确认,而后重启服务,重启成功后自动刷新页面。

Alternatives

No response

Additional Context

No response

[Bug]: TimeoutError

telegram_media_downloader version or commit

2.1.9

What OS are you seeing the problem on?

Windows

Python Version

3.8.10

What happened?

Yesterday I ran into a problem. On neighboring computers - in one your program works, and in the other it ends with a timeout. A day ago, both there and there worked fine. Works on win7, stops on win10. Everything else is the same - settings, session, provider, telegram_media_downloader version, Python version, etc.
Proxies and VPNs don't help. Moreover, Telegram Desktop works both there and there, I don’t use ProxyMTProto.
On win10, only Chrome, Opera, TeamViewer and Microsoft Defender Antivirus (KB2267602) was updated yesterday.
Folders \Python38\Lib\site-packages\pyrogram and \telegram_media_downloader added to Defender exceptions - does not help.
I tried to delete media_downloader.session and start a new session - the program only asks for the Telegram login code, it does not ask for a cloud password - it exits by timeout.

Windows 10 Enterprise LTSC Edition
Version 21H2
OS Build 19044.3086
Interoperability Windows Feature Experience Pack 1000.19041.1000.0

git log --oneline
* 1280550 (HEAD -> master, origin/master, origin/HEAD) fix: download error (#88)

Expected Behavior

2023-06-29 21:16:09.270 | INFO     | utils.meta:print_meta:22 - Device: CPython 3.8.10 - Telegram Media Downloader 2.1.9
2023-06-29 21:16:09.271 | INFO     | utils.meta:print_meta:23 - System: Windows 10 (EN)
2023-06-29 21:18:42.708 | ERROR    | __main__:main:610 - 
Traceback (most recent call last):

  File "media_downloader.py", line 632, in <module>
    main()
    L <function main at 0x0000023646561C10>

> File "media_downloader.py", line 594, in main
    client.start()
    │      L <function Start.start at 0x0000023644921CA0>
    L <pyrogram.client.Client object at 0x0000023646572CA0>

  File "C:\Users\user1\AppData\Local\Programs\Python\Python38\lib\site-packages\pyrogram\sync.py", line 66, in async_to_sync_wrap
    return loop.run_until_complete(coroutine)
           │    │                  L <coroutine object Start.start at 0x0000023646558E40>
           │    L <function BaseEventLoop.run_until_complete at 0x0000023642989C10>
           L <ProactorEventLoop running=False closed=False debug=False>

  File "C:\Users\user1\AppData\Local\Programs\Python\Python38\lib\asyncio\base_events.py", line 616, in run_until_complete
    return future.result()
           │      L <method 'result' of '_asyncio.Task' objects>
           L <Task finished name='Task-1' coro=<Start.start() done, defined at C:\Users\user1\AppData\Local\Programs\Python\Python38\lib\s...

  File "C:\Users\user1\AppData\Local\Programs\Python\Python38\lib\site-packages\pyrogram\methods\utilities\start.py", line 62, in start
    await self.authorize()
          │    L <function Client.authorize at 0x00000236448B64C0>
          L <pyrogram.client.Client object at 0x0000023646572CA0>

  File "C:\Users\user1\AppData\Local\Programs\Python\Python38\lib\site-packages\pyrogram\client.py", line 346, in authorize
    signed_in = await self.sign_in(self.phone_number, sent_code.phone_code_hash, self.phone_code)
                      │    │       │    │             │         │                │    L '26729'
                      │    │       │    │             │         │                L <pyrogram.client.Client object at 0x0000023646572CA0>
                      │    │       │    │             │         L '1c8crgrd22267439ff'
                      │    │       │    │             L pyrogram.types.SentCode(type=pyrogram.enums.SentCodeType.APP, phone_code_hash='1c8crgrd22267439ff')
                      │    │       │    L '+79121112233'
                      │    │       L <pyrogram.client.Client object at 0x0000023646572CA0>
                      │    L <function SignIn.sign_in at 0x0000023644921940>
                      L <pyrogram.client.Client object at 0x0000023646572CA0>

  File "C:\Users\user1\AppData\Local\Programs\Python\Python38\lib\site-packages\pyrogram\methods\auth\sign_in.py", line 63, in sign_in
    r = await self.invoke(
              │    L <function Invoke.invoke at 0x00000236449164C0>
              L <pyrogram.client.Client object at 0x0000023646572CA0>

  File "C:\Users\user1\AppData\Local\Programs\Python\Python38\lib\site-packages\pyrogram\methods\advanced\invoke.py", line 79, in invoke
    r = await self.session.invoke(
              │    │       L <function Session.invoke at 0x00000236444D33A0>
              │    L <pyrogram.session.session.Session object at 0x00000236465ABA90>
              L <pyrogram.client.Client object at 0x0000023646572CA0>

  File "C:\Users\user1\AppData\Local\Programs\Python\Python38\lib\site-packages\pyrogram\session\session.py", line 378, in invoke
    return await self.invoke(query, retries - 1, timeout)
                 │    │      │      │            L 15
                 │    │      │      L 5
                 │    │      L pyrogram.raw.functions.auth.SignIn(phone_number='79121112233', phone_code_hash='1c8crgrd22267439ff', phone_code='26729')
                 │    L <function Session.invoke at 0x00000236444D33A0>
                 L <pyrogram.session.session.Session object at 0x00000236465ABA90>

  File "C:\Users\user1\AppData\Local\Programs\Python\Python38\lib\site-packages\pyrogram\session\session.py", line 378, in invoke
    return await self.invoke(query, retries - 1, timeout)
                 │    │      │      │            L 15
                 │    │      │      L 4
                 │    │      L pyrogram.raw.functions.auth.SignIn(phone_number='79121112233', phone_code_hash='1c8crgrd22267439ff', phone_code='26729')
                 │    L <function Session.invoke at 0x00000236444D33A0>
                 L <pyrogram.session.session.Session object at 0x00000236465ABA90>

  File "C:\Users\user1\AppData\Local\Programs\Python\Python38\lib\site-packages\pyrogram\session\session.py", line 378, in invoke
    return await self.invoke(query, retries - 1, timeout)
                 │    │      │      │            L 15
                 │    │      │      L 3
                 │    │      L pyrogram.raw.functions.auth.SignIn(phone_number='79121112233', phone_code_hash='1c8crgrd22267439ff', phone_code='26729')
                 │    L <function Session.invoke at 0x00000236444D33A0>
                 L <pyrogram.session.session.Session object at 0x00000236465ABA90>
  [Previous line repeated 2 more times]

  File "C:\Users\user1\AppData\Local\Programs\Python\Python38\lib\site-packages\pyrogram\session\session.py", line 371, in invoke
    raise e from None

  File "C:\Users\user1\AppData\Local\Programs\Python\Python38\lib\site-packages\pyrogram\session\session.py", line 358, in invoke
    return await self.send(query, timeout=timeout)
                 │    │    │              L 15
                 │    │    L pyrogram.raw.functions.auth.SignIn(phone_number='79121112233', phone_code_hash='1c8crgrd22267439ff', phone_code='26729')
                 │    L <function Session.send at 0x00000236444D3310>
                 L <pyrogram.session.session.Session object at 0x00000236465ABA90>

  File "C:\Users\user1\AppData\Local\Programs\Python\Python38\lib\site-packages\pyrogram\session\session.py", line 323, in send
    raise TimeoutError

TimeoutError

Current Behavior

A bug happened!

Possible Solution

No response

Steps to Reproduce

No response

Relevant log output

No response

[Suggestion] Save messages to a file

Is your feature request related to a problem? Please describe.
Suggestion. Save messages to a file . Sometimes there is useful information in messages.

Describe the solution you'd like
One file per chat. Implement an option of what should be saved. For example, message ID, sender, sender's ID, message text itself. For a message that is a video or photo, write the name of the file with which it is saved to disk.

Describe alternatives you've considered
Saving manually T_T

[Feature]: 自定义文件名messageid长度自定义

Description

目前自定义文件名时,mseeageid为1的文件,会变成1-xxx.mp4,但是这个在onedrive中的排序是混乱的

Suggested Solution

是否可以新增一个自定义配置选项,可修改自定义文件命名中messageid的长度,假如设置为4,那messageid为1的文件,下载下来就是0001-xxx.mp4

Alternatives

No response

Additional Context

No response

Is there an easy way to migrate from Dineshkarthik's TMD?

Hi, I've been using his software for almost a year now, but have noticed some connection issues and config.yaml corruption, apart from 0 bytes files... I understand your software is better at this. Is there a way to migrate without RE-DOWNLOADING? I got like 4tb of 64 channels. I created via a script a python environment for each and any of them. I noticed your software also has the option to download all channels at once. Do you have any idea on how can I migrate without redownloading, and also, attempting to download the 0 bytes that were missing because of Dineshkarthik´s version? Thanks in advance.

转发参数 bug

/forward https://t.me/c/src_chat https://t.me/c/dst_chat 100 400 [Filter]
转发参数 设定100 400 并不会转发第100条到400条 消息 而是转发第100条消息后的400条消息
就是说设定100 400 实际上转发的是第100条消息到第500条消息
而且我想转发20条消息 设置成 100 20 还不可以 后面的参数必须大于前面的 这就很尴尬

v2.2.0 plan

checklist

  • 下载页面展示 v2.1.1
  • 支持多频道下载 v2.1.4
  • 支持通过电报机器人下发指令,下载,转发,包括私有视频转发 v2.1.6
  • 支持指定下载文件大小,日期,消息文本,消息id,视频质量,视频长度过滤,v2.1.3。查阅 如何使用下载过滤器

checklist

  • Download page display v2.1.1
  • Support multi-channel download v2.1.4
  • Support sending instructions, downloading, reposting, including private video reposting via telegram bot v2.1.6
  • Support specifying download file size, date, message text, message id, video quality, video length filtering, v2.1.3. Check out How to use Filter

[Bug]: 新版本问题

telegram_media_downloader version or commit

2.1.8

What OS are you seeing the problem on?

Other Linux Distro

Python Version

No response

What happened?

运行 python3 media_downloader.py

A 账号注册的 bot,api_hash,api_id

用 A 账号电话登录

用 A 账号转发东西到 bot, 都是 Skipped, 没有下载。
用 B 账号转发东西到 bot,log 报错

2023-05-12 00:48:21.079 | ERROR    | __main__:worker:485 - Telegram says: [400 PEER_ID_INVALID] - The peer id being used is invalid or not known yet. Make sure you meet the peer before interacting with it 
Traceback (most recent call last):

  File "/usr/local/lib/python3.10/dist-packages/pyrogram/methods/advanced/resolve_peer.py", line 62, in resolve_peer
    return await self.storage.get_peer_by_id(peer_id)
                 │    │       │              └ 5415771761
                 │    │       └ <function SQLiteStorage.get_peer_by_id at 0xffffb3035c60>
                 │    └ <pyrogram.storage.file_storage.FileStorage object at 0xffffb22a2260>
                 └ <pyrogram.client.Client object at 0xffffb2a3da80>
  File "/usr/local/lib/python3.10/dist-packages/pyrogram/storage/sqlite_storage.py", line 148, in get_peer_by_id
    raise KeyError(f"ID not found: {peer_id}")

KeyError: 'ID not found: 5415771761'


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "/usr/local/lib/python3.10/dist-packages/pyrogram/methods/advanced/resolve_peer.py", line 123, in resolve_peer
    return await self.storage.get_peer_by_id(peer_id)
                 │    │       │              └ 5415771761
                 │    │       └ <function SQLiteStorage.get_peer_by_id at 0xffffb3035c60>
                 │    └ <pyrogram.storage.file_storage.FileStorage object at 0xffffb22a2260>
                 └ <pyrogram.client.Client object at 0xffffb2a3da80>
  File "/usr/local/lib/python3.10/dist-packages/pyrogram/storage/sqlite_storage.py", line 148, in get_peer_by_id
    raise KeyError(f"ID not found: {peer_id}")

KeyError: 'ID not found: 5415771761'


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "/root/telegram_media_downloader/media_downloader.py", line 624, in <module>
    main()
    └ <function main at 0xffffb229e5f0>

  File "/root/telegram_media_downloader/media_downloader.py", line 598, in main
    _exec_loop()
    └ <function _exec_loop at 0xffffb229e4d0>

  File "/root/telegram_media_downloader/media_downloader.py", line 563, in _exec_loop
    app.loop.run_forever()
    │   │    └ <function BaseEventLoop.run_forever at 0xffffb4345990>
    │   └ <_UnixSelectorEventLoop running=True closed=False debug=False>
    └ <module.app.Application object at 0xffffb22a09a0>

  File "/usr/lib/python3.10/asyncio/base_events.py", line 600, in run_forever
    self._run_once()
    │    └ <function BaseEventLoop._run_once at 0xffffb4347490>
    └ <_UnixSelectorEventLoop running=True closed=False debug=False>
  File "/usr/lib/python3.10/asyncio/base_events.py", line 1896, in _run_once
    handle._run()
    │      └ <function Handle._run at 0xffffb44f6ef0>
    └ <Handle Task.task_wakeup(<Future finished result=None>)>
  File "/usr/lib/python3.10/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
    │    │            │    │           │    └ <member '_args' of 'Handle' objects>
    │    │            │    │           └ <Handle Task.task_wakeup(<Future finished result=None>)>
    │    │            │    └ <member '_callback' of 'Handle' objects>
    │    │            └ <Handle Task.task_wakeup(<Future finished result=None>)>
    │    └ <member '_context' of 'Handle' objects>
    └ <Handle Task.task_wakeup(<Future finished result=None>)>

> File "/root/telegram_media_downloader/media_downloader.py", line 483, in worker
    await download_task(client, message, node)
          │             │       │        └ <module.app.TaskNode object at 0xffffb10c78e0>
          │             │       └ pyrogram.types.Message(id=672, from_user=pyrogram.types.User(id=5415771761, is_self=False, is_contact=False, is_mutual_contac...
          │             └ <pyrogram.client.Client object at 0xffffb2a3da80>
          └ <function download_task at 0xffffb229e050>

  File "/root/telegram_media_downloader/media_downloader.py", line 271, in download_task
    download_status, file_name = await download_media(
                                       └ <function download_media at 0xffffb229de10>

  File "/root/telegram_media_downloader/module/pyrogram_extension.py", line 329, in inner
    status, file_name = await func(
                              └ <function download_media at 0xffffb229e3b0>

  File "/root/telegram_media_downloader/media_downloader.py", line 356, in download_media
    message = await fetch_message(client, message)
                    │             │       └ pyrogram.types.Message(id=672, from_user=pyrogram.types.User(id=5415771761, is_self=False, is_contact=False, is_mutual_contac...
                    │             └ <pyrogram.client.Client object at 0xffffb2a3da80>
                    └ <function fetch_message at 0xffffb28eee60>

  File "/root/telegram_media_downloader/module/pyrogram_extension.py", line 482, in fetch_message
    return await client.get_messages(
                 │      └ <function GetMessages.get_messages at 0xffffb30e95a0>
                 └ <pyrogram.client.Client object at 0xffffb2a3da80>

  File "/usr/local/lib/python3.10/dist-packages/pyrogram/methods/messages/get_messages.py", line 101, in get_messages
    peer = await self.resolve_peer(chat_id)
                 │    │            └ 5415771761
                 │    └ <function ResolvePeer.resolve_peer at 0xffffb30eab00>
                 └ <pyrogram.client.Client object at 0xffffb2a3da80>
  File "/usr/local/lib/python3.10/dist-packages/pyrogram/methods/advanced/resolve_peer.py", line 125, in resolve_peer
    raise PeerIdInvalid
          └ <class 'pyrogram.errors.exceptions.bad_request_400.PeerIdInvalid'>

pyrogram.errors.exceptions.bad_request_400.PeerIdInvalid: Telegram says: [400 PEER_ID_INVALID] - The peer id being used is invalid or not known yet. Make sure you meet the peer before interacting with it 
  1. 用 b 账号手机登录
    b 账号转发东西到 Bot, 有些 Skipped,有些能下载,但是下载下来的东西不是我转发的,是之前的转发的内容
    a 账号转发东西到 bot, log 报错,跟上面的一样

Expected Behavior

一些正常

上一个版本
无论哪个账号登陆
哪个账号转发到 Bot
一切正常下载

Current Behavior

.

Possible Solution

No response

Steps to Reproduce

No response

Relevant log output

No response

[Bug]: docker部署时无法出现验证手机号和验证码的步骤

telegram_media_downloader version or commit

v2.1.9

What OS are you seeing the problem on?

Other Linux Distro

Python Version

3.8.10

What happened?

用的docker运行,不知道是什么原因出现了如下图的问题,界面卡着不动,并且显示时间和系统时间也不一样。等了十几分钟还是没有动静。用的是1c1g的小鸡,系统是ubuntu20.04.4 LTS。
image

Expected Behavior

能够正常运行

Current Behavior

无法出现验证手机号和代码

Possible Solution

No response

Steps to Reproduce

No response

Relevant log output

No response

[Bug]: try upgrade and new download but same

telegram_media_downloader version or commit

2.2.0

What OS are you seeing the problem on?

Mac

Python Version

3.11

What happened?

Hello How are ?
first thanks for all u Hard Work
i try upgrade script and install new script but same result its give me Old version 2.1.9
Not 2.2.0

Screen Shot 2023-06-29 at 9 24 59 PM

Expected Behavior

not update the file may be or something i missed

Current Behavior

not give me 2.2.0

Possible Solution

No response

Steps to Reproduce

No response

Relevant log output

No response

video thumbnail support

Could there be an option to choose whether to download the thumbnail along with the video if there are thumbnails in some videos?
Thank you in advance.

[Bug]: AttributeError: 'NoneType' object has no attribute 'id'

telegram_media_downloader version or commit

v2.1.9

What OS are you seeing the problem on?

Windows

Python Version

3.11.4

What happened?

telegram_media_downloader>py media_downloader.py
[18:05:11] Telegram Media Downloader v2.1.9,                                                                  meta.py:18           Copyright (C) 2023 tangyoha <https://github.com/tangyoha>
           Licensed under the terms of the MIT License                                                        meta.py:21
2023-06-22 18:05:11.800 | INFO     | utils.meta:print_meta:22 - Device: CPython 3.11.4 - Telegram Media Downloader 2.1.92023-06-22 18:05:11.800 | INFO     | utils.meta:print_meta:23 - System: Windows 10 (EN)
 * Serving Flask app 'module.web'
 * Debug mode: off
2023-06-22 18:05:13.914 | SUCCESS  | __main__:main:592 - Successfully started (Press Ctrl+C to stop)
2023-06-22 18:05:13.914 | INFO     | __main__:download_chat_task:508 - Downloading files failed during last run...
2023-06-22 18:05:14.219 | ERROR    | __main__:worker:491 - 'NoneType' object has no attribute 'id'
Traceback (most recent call last):

  File "telegram_media_downloader\media_downloader.py", line 629, in <module>
    main()
    └ <function main at 0x00000276898CBE20>

  File "telegram_media_downloader\media_downloader.py", line 603, in main
    _exec_loop()
    └ <function _exec_loop at 0x00000276898CBD80>

  File "telegram_media_downloader\media_downloader.py", line 570, in _exec_loop
    app.loop.run_until_complete(run_until_all_task_finish())
    │   │    │                  └ <function run_until_all_task_finish at 0x00000276898CBCE0>
    │   │    └ <function BaseEventLoop.run_until_complete at 0x00000276862A9080>
    │   └ <ProactorEventLoop running=True closed=False debug=False>
    └ <module.app.Application object at 0x0000027689850CD0>

  File "E:\runtime\Python311\Lib\asyncio\base_events.py", line 640, in run_until_complete
    self.run_forever()
    │    └ <function ProactorEventLoop.run_forever at 0x000002768635C360>
    └ <ProactorEventLoop running=True closed=False debug=False>
  File "E:\runtime\Python311\Lib\asyncio\windows_events.py", line 321, in run_forever
    super().run_forever()
  File "E:\runtime\Python311\Lib\asyncio\base_events.py", line 607, in run_forever
    self._run_once()
    │    └ <function BaseEventLoop._run_once at 0x00000276862AADE0>
    └ <ProactorEventLoop running=True closed=False debug=False>
  File "E:\runtime\Python311\Lib\asyncio\base_events.py", line 1922, in _run_once
    handle._run()
    │      └ <function Handle._run at 0x0000027685DE1440>
    └ <Handle Task.task_wakeup(<Future finished result=None>)>
  File "E:\runtime\Python311\Lib\asyncio\events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
    │    │            │    │           │    └ <member '_args' of 'Handle' objects>
    │    │            │    │           └ <Handle Task.task_wakeup(<Future finished result=None>)>
    │    │            │    └ <member '_callback' of 'Handle' objects>
    │    │            └ <Handle Task.task_wakeup(<Future finished result=None>)>
    │    └ <member '_context' of 'Handle' objects>
    └ <Handle Task.task_wakeup(<Future finished result=None>)>

> File "telegram_media_downloader\media_downloader.py", line 489, in worker
    await download_task(client, message, node)
          │             │       │        └ <module.app.TaskNode object at 0x0000027687C7ED90>
          │             │       └ pyrogram.types.Message(id=1245, empty=True)
          │             └ <pyrogram.client.Client object at 0x00000276898FB850>
          └ <function download_task at 0x00000276898CB7E0>

  File "telegram_media_downloader\media_downloader.py", line 273, in download_task
    download_status, file_name = await download_media(
                                       └ <function download_media at 0x00000276898CB920>

  File "telegram_media_downloader\module\pyrogram_extension.py", line 337, in inner
    status, file_name = await func(
                              └ <function download_media at 0x00000276898CB880>

  File "telegram_media_downloader\media_downloader.py", line 359, in download_media
    message = await fetch_message(client, message)
                    │             │       └ pyrogram.types.Message(id=1245, empty=True)
                    │             └ <pyrogram.client.Client object at 0x00000276898FB850>
                    └ <function fetch_message at 0x0000027689286660>

  File "telegram_media_downloader\module\pyrogram_extension.py", line 500, in fetch_message
    chat_id=message.chat.id,
            │       └ None
            └ pyrogram.types.Message(id=1245, empty=True)

AttributeError: 'NoneType' object has no attribute 'id'






Expected Behavior

After the download is complete, open it again and the above error will appear

Current Behavior

After the download is complete, open it again and the above error will appear

Possible Solution

No response

Steps to Reproduce

No response

Relevant log output

No response

v2.2.1

  • 使用pikpak网盘中转下载

[Feature]: download information count

Description

Hello , How are u ?
can u add feature on table total download by type of file on web page ?
for example video 1/22 images 5/66 document 11/11
video 1/22 means of 1/22 complete downloaded 1 from 22
images 5/66 means of 5/66 complete downloaded 5 from 66
document 11/11 means of 11/11 complete downloaded 11 from 11

thanks for u

Suggested Solution

0

Alternatives

No response

Additional Context

No response

[Feature]: Add the use of unique_id to deduplicate

Description

重复的下载会浪费流量,减少重复的下载可以提高下载的效率

Suggested Solution

使用文件的unique id去重,该功能作为可选选配置。支持bot配置,支持文件配置

Alternatives

No response

Additional Context

No response

Add window executable support

Is your feature request related to a problem? Please describe.
利于普通用户使用

Describe the solution you'd like
跳过安装python等过程

Describe alternatives you've considered
暂无

Additional context
暂无

[Bug]: new version 2.2.1

telegram_media_downloader version or commit

2.2.1

What OS are you seeing the problem on?

Mac

Python Version

3.11.5

What happened?

i cant make install from terminal
this file coming for me when i download
Screen Shot 2023-08-30 at 2 48 42 AM

Expected Behavior

i think its differnet apps

Current Behavior

still not working

Possible Solution

No response

Steps to Reproduce

No response

Relevant log output

No response

Optimize bot reply

Is your feature request related to a problem? Please describe.
优化bot回复

Describe the solution you'd like
能够显示下载进度,上传进度等

Describe alternatives you've considered
暂无

Additional context
暂无

[Feature]: Only download assets from a specific topic

Description

There are numerous topics in a group, and if I specify the chat_id as well as the range, for example, download_filter: id >= 8244 && id <= 8262, videos from other topics in this group will also be downloaded because they may have been multi-uploading to different topics.

Since the chat_id for all the topics in the group is the same, is there anyway the applet can identify and download the assets (images/videos/etc.) only from specific topics, like https://t.me/c/1745040687/9840 and https://t.me/c/1745040687/49 respectively?

Suggested Solution

A way to download assets only from a specific topic in a group without id range.

Alternatives

No response

Additional Context

No response

Docker镜像权限问题

增加支持设置UID和GIU,现在镜像版本因权限问题无法启动。

2023-04-07 04:38:45.228711+00:00WARNING: Couldn't open 'parser.out'. [Errno 13] Permission denied: '/app/module/parser.out' 2023-04-07 04:38:45.229311+00:00Generating LALR tables 2023-04-07 04:38:45.244312+00:00WARNING: Couldn't create 'module.parsetab'. [Errno 13] Permission denied: '/app/module/parsetab.py' 2023-04-07 04:38:45.420055+00:00WARNING: Couldn't open 'parser.out'. [Errno 13] Permission denied: '/app/module/parser.out' 2023-04-07 04:38:45.420658+00:00Generating LALR tables 2023-04-07 04:38:45.435707+00:00WARNING: Couldn't create 'module.parsetab'. [Errno 13] Permission denied: '/app/module/parsetab.py' 2023-04-07 04:38:45.437448+00:00Traceback (most recent call last): 2023-04-07 04:38:45.437498+00:00File "/app/media_downloader.py", line 43, in <module> 2023-04-07 04:38:45.437533+00:00logger.add( 2023-04-07 04:38:45.437549+00:00File "/usr/local/lib/python3.11/site-packages/loguru/_logger.py", line 762, in add 2023-04-07 04:38:45.437670+00:00wrapped_sink = FileSink(path, **kwargs) 2023-04-07 04:38:45.437719+00:00^^^^^^^^^^^^^^^^^^^^^^^^ 2023-04-07 04:38:45.437752+00:00File "/usr/local/lib/python3.11/site-packages/loguru/_file_sink.py", line 166, in __init__ 2023-04-07 04:38:45.437772+00:00self._initialize_file() 2023-04-07 04:38:45.437785+00:00File "/usr/local/lib/python3.11/site-packages/loguru/_file_sink.py", line 185, in _initialize_file 2023-04-07 04:38:45.437830+00:00path = self._prepare_new_path() 2023-04-07 04:38:45.437868+00:00^^^^^^^^^^^^^^^^^^^^^^^^ 2023-04-07 04:38:45.437883+00:00File "/usr/local/lib/python3.11/site-packages/loguru/_file_sink.py", line 181, in _prepare_new_path 2023-04-07 04:38:45.437906+00:00os.makedirs(dirname, exist_ok=True) 2023-04-07 04:38:45.437934+00:00File "<frozen os>", line 225, in makedirs 2023-04-07 04:38:45.437960+00:00PermissionError: [Errno 13] Permission denied: '/app/log'

[Feature]: support get the messge content of the picture

Description

image

i need get the messge content of the picture like above:

Discord @szsailout Midjourney #art A bento, white background, fresh ingredients, fruit tomato, broccoli, pasta, shrimp, corn kernels, ultra - realistic, bright, 45° viewing angle, ray tracing, UE4, size 2k
subscribe (https://t.me/midjourney_ru) • search_MJ_bot (https://t.me/search_MJ_bot)

how to config or
could you please support this feature?

Suggested Solution

add media_type of config.yaml

Alternatives

No response

Additional Context

No response

[Feature]: Add STOP button on webui

Description

Hi. A stop button in the webui would be very useful

Suggested Solution

Add this button in the webui so if you want to stop downloading a file, you just need to press this button. The stop button should only stop downloading the file it is related to.

Alternatives

No response

Additional Context

No response

[Feature]: mark messages as read

Description

Is it possible to mark messages that have been processed by the program as read?
is it possible to add files to media_type fb2, fb2.zip, epub ?

could you please support this feature?

Suggested Solution

add parameter to config.yaml
add media_type to config.yaml

Alternatives

No response

Additional Context

No response

DOC: some chat_id can't found

Location of the documentation

[this should provide the location of the documentation, e.g. "CONTRIBUTION.md" or the URL of the documentation, e.g. "https://github.com/tangyoha/telegram_media_downloader/blob/master/CONTRIBUTING.md"]

Documentation problem

[this should provide a description of what documentation you believe needs to be fixed/improved]

Suggested fix for documentation

[this should explain the suggested fix and why it's better than the existing documentation]

Fix forward message error

Describe the bug
转发失败导致出错

To Reproduce
Share the config: Please don't share your api_hash & api_id

chat_id: telegram_chat_id
last_read_message_id: 0
media_types:
- audio
- photo
- video
- document
- voice
file_formats:
  audio:
  - all
  document:
  - all
  video:
  - all

Python Version
Python: [e.g. 3.7.7]

OS:
The OS and its version: [e.g. Ubuntu 20.04]

Logs
Logs showing the exception

Additional context
Add any other context about the problem here.

【新功能请求】将一次性下载做成常驻脚本

问题:
有时候梯子不稳定,会有timeout,会导致下载失败。
还有一些群组文件是定时删除,如果没有及时保存或下载就没有了。

期望:
将脚本做成常驻应用,就是下载完成后不退出,定时检测群组的文件,如果有新文件则下载或转发。
能选定转发和下载的文件类型,并可视化出来就更好了。

最后感谢大佬的辛苦付出!

can't download only pdf

api_hash:
api_id:
chat_id:
disable_syslog:

  • INFO
    file_formats:
    document:
    • pdf
      file_path_prefix:
  • chat_title
  • media_datetime
    ids_to_retry: []
    last_read_message_id: 60
    media_types:
  • document
    save_path: H:\telegram_media_downloader-master\telegram_media_downloader-master

I want to download only pdf, but not only pdf but also all documents such as epub are downloaded.

Fix files forwarded to bots could not be uploaded using rclone

Describe the bug
修复转发给机器人的文件无法使用rclone上传

To Reproduce

Python Version
Python: [e.g. 3.7.7]

OS:
The OS and its version: [e.g. Ubuntu 20.04]

Logs
Logs showing the exception

Additional context
Add any other context about the problem here.

[Bug]: window exe can not view web

telegram_media_downloader version or commit

v.2.2.1

What OS are you seeing the problem on?

Windows

Python Version

No response

What happened?

window下解压缩发布版本,运行后无法访问网页

Expected Behavior

window下解压缩发布版本,运行后无法访问网页

Current Behavior

window下解压缩发布版本,运行后无法访问网页

Possible Solution

No response

Steps to Reproduce

No response

Relevant log output

No response

[Bug]: after update #81 the program freezes half way

telegram_media_downloader version or commit

2.1.9 from 2023-06-18

What OS are you seeing the problem on?

Windows

Python Version

3.8.10

What happened?

A bug happened!

maybe today's update of WebView2 Runtime Edge influenced?
rolling back to 2.1.9 from 2023-05-16 did not help.
or is it that I run "pip3 install -r requirements.txt" after each download of py files?

2023-06-18 20:47:28.466 | INFO | utils.meta:print_meta:22 - Device: CPython 3.8.10 - Telegram Media Downloader 2.1.9
2023-06-18 20:47:28.467 | INFO | utils.meta:print_meta:23 - System: Windows 10 (EN)
2023-06-18 20:47:29.781 | SUCCESS | main:main:591 - Successfully started (Press Ctrl+C to stop)
2023-06-18 20:47:29.782 | INFO | main:download_chat_task:505 - Downloading files failed during last run...
2023-06-18 20:47:29.855 | ERROR | main:worker:489 - 'NoneType' object has no attribute 'id'
Traceback (most recent call last):

File "media_downloader.py", line 628, in
main()
└ <function main at 0x000002445F995AF0>

File "media_downloader.py", line 602, in main
_exec_loop()
└ <function _exec_loop at 0x000002445F995A60>

File "media_downloader.py", line 569, in _exec_loop
app.loop.run_until_complete(run_until_all_task_finish())
│ │ │ └ <function run_until_all_task_finish at 0x000002445F9959D0>
│ │ └ <function BaseEventLoop.run_until_complete at 0x000002445BDBAC10>
│ └
└ <module.app.Application object at 0x000002445F97B520>

File "C:\Users\user1\AppData\Local\Programs\Python\Python38\lib\asyncio\base_events.py", line 603, in run_until_complete
self.run_forever()
│ └ <function ProactorEventLoop.run_forever at 0x000002445BE8A430>

File "C:\Users\user1\AppData\Local\Programs\Python\Python38\lib\asyncio\windows_events.py", line 316, in run_forever
super().run_forever()

File "C:\Users\user1\AppData\Local\Programs\Python\Python38\lib\asyncio\base_events.py", line 570, in run_forever
self._run_once()
│ └ <function BaseEventLoop._run_once at 0x000002445BDBF700>

File "C:\Users\user1\AppData\Local\Programs\Python\Python38\lib\asyncio\base_events.py", line 1859, in _run_once
handle._run()
│ └ <function Handle._run at 0x000002445BD2B310>
└ <Handle <TaskWakeupMethWrapper object at 0x000002445FC3DD60>()>

File "C:\Users\user1\AppData\Local\Programs\Python\Python38\lib\asyncio\events.py", line 81, in _run
self._context.run(self._callback, *self._args)
│ │ │ │ │ └ <member '_args' of 'Handle' objects>
│ │ │ │ └ <Handle <TaskWakeupMethWrapper object at 0x000002445FC3DD60>()>
│ │ │ └ <member '_callback' of 'Handle' objects>
│ │ └ <Handle <TaskWakeupMethWrapper object at 0x000002445FC3DD60>()>
│ └ <member '_context' of 'Handle' objects>
└ <Handle <TaskWakeupMethWrapper object at 0x000002445FC3DD60>()>

File "media_downloader.py", line 487, in worker
await download_task(client, message, node)
│ │ │ └ <module.app.TaskNode object at 0x000002445FC197F0>
│ │ └ pyrogram.types.Message(id=16999, empty=True)
│ └ <pyrogram.client.Client object at 0x000002445F9B3A60>
└ <function download_task at 0x000002445F995550>

File "media_downloader.py", line 271, in download_task
download_status, file_name = await download_media(
└ <function download_media at 0x000002445F995670>

File "K:\Exec\tangyoha-tmd\module\pyrogram_extension.py", line 329, in inner
status, file_name = await func(
└ <function download_media at 0x000002445F9955E0>

File "media_downloader.py", line 357, in download_media
message = await fetch_message(client, message)
│ │ └ pyrogram.types.Message(id=16999, empty=True)
│ └ <pyrogram.client.Client object at 0x000002445F9B3A60>
└ <function fetch_message at 0x000002445E395820>

File "K:\Exec\tangyoha-tmd\module\pyrogram_extension.py", line 492, in fetch_message
chat_id=message.chat.id,
│ └ None
└ pyrogram.types.Message(id=16999, empty=True)

AttributeError: 'NoneType' object has no attribute 'id'
2023-06-18 20:47:31.481 | SUCCESS | main:_check_download_finish:77 - Successfully downloaded - K:\Exec\tangyoha-tmd\document\83932 - Золушка для инквизитора.fb2
2023-06-18 20:47:31.485 | SUCCESS | main:_check_download_finish:77 - Successfully downloaded - K:\Exec\tangyoha-tmd\document\83933 - 03_Олигарх_из_будущего_Книга_3_Миллионы_рождают_власть.fb2

here the program hangs and waits until you interrupt it manually <<<<<<<<<<

2023-06-18 20:47:50.291 | INFO | main:main:604 - KeyboardInterrupt
2023-06-18 20:47:50.381 | INFO | main:main:612 - Stopped!
2023-06-18 20:47:50.768 | INFO | main:main:614 - update config......
2023-06-18 20:47:50.772 | SUCCESS | main:main:618 - Updated last read message_id to config file,total download 2, total upload file 0

Expected Behavior

how to return the normal operation of the program?

Current Behavior

download stops, it is not clear how many messages have been processed and how many are left

Possible Solution

No response

Steps to Reproduce

No response

Relevant log output

No response

v2.3.0 plan

新功能

  • 添加 docker运行脚本
  • 支持监听频道消息,并过滤下载媒体
  • 支持多账号登录下载
  • 支持同频道下载md5去重

feature

  • Add docker run script
  • Support for monitoring channel messages and filtering download media
  • Support multi-account login download

[Feature]: Getting text from the posts

Description

Sometimes (if not always) images without context mean nothing. I would like a feature to be added, so a text file is attached to each downloaded file, using the description used by the uploader. Scraping TG with wget or archivebox is often messy, as you get repeated posts in one page. So if one could have the original description for each file it would be great.

Suggested Solution

I don't know. The telegram posts seem to have a unique html viewable on the web, like 5089.html, after the channel’s url. Maybe that can be used.

Alternatives

No response

Additional Context

I know someone mentioned this before, but I saw no response.

增加自带定时触发下载任务的功能

目前是用k3s cronjob来触发下载,跑完就没了webui的一些进度也看不了。
可以在启动项里增加一个选项来定义?默认不增加就是现有的模式

[Bug]: 转发 可以转发的频道的信息 只能转发2000条

telegram_media_downloader version or commit

2.2.0

What OS are you seeing the problem on?

Windows

Python Version

3.11.4

What happened?

转发 可以转发频道的信息 只能转发2000条 之后的就会失败
/forward https://t.me/c/chart https://t.me/c/chart 9701 9720
执行之后没有数量限制 还是直接转发2000条

Expected Behavior

可以一直转发

Current Behavior

转发 可以转发频道的信息 只能转发2000条 之后的就会失败
/forward https://t.me/c/chart https://t.me/c/chart 9701 9720
执行之后没有数量限制 还是直接转发2000条

Possible Solution

No response

Steps to Reproduce

No response

Relevant log output

No response

[Feature]: Add bot forward support

Description

使用机器人转发消息到指定群组

Suggested Solution

使用机器人池转发,避免洪水限制

Alternatives

No response

Additional Context

No response

Do not use pre-created config.yaml and data.yaml files because of the difficulty of updating.

Is your feature request related to a problem? Please describe.
When I update a program from the git, I have to manually restore the files: config.yaml and data.yaml

Describe the solution you'd like
I recommend not including these files in git. Their existence should be checked when I run the script. If they don't exist, the script should ask for api_hash, api_id and chat_id and create these files from the template.

[Bug]: always download the last file

telegram_media_downloader version or commit

2.1.9

What OS are you seeing the problem on?

Windows

Python Version

3.8.10

What happened?

the message ID shows that the program is re-downloading the file, the one that was in the last message at the last start and has already been downloaded.
this happens in every chat/group


1 start
2023-06-11 18:39:35.891 | INFO | utils.meta:print_meta:22 - Device: CPython 3.8.10 - Telegram Media Downloader 2.1.9
2023-06-11 18:39:35.892 | INFO | utils.meta:print_meta:23 - System: Windows 10 (EN)
2023-06-11 18:39:37.099 | SUCCESS | main:main:591 - Запуск успешный (нажмите Ctrl + C для остановки)
2023-06-11 18:39:38.325 | SUCCESS | main:_check_download_finish:77 - Успешно скачано - K:\Exec\tangyoha-tmd\document\16862 - [RPF] Виделись! (H).fb2
2023-06-11 18:39:38.382 | SUCCESS | main:_check_download_finish:77 - Успешно скачано - K:\Exec\tangyoha-tmd\document\82859 - 13 Догнать и перегнать 1978.fb2
...
2023-06-11 18:39:42.276 | SUCCESS | main:_check_download_finish:77 - Успешно скачано - K:\Exec\tangyoha-tmd\document\82878 - 03 Несущий бурю. Том III.fb2
2023-06-11 18:39:44.176 | INFO | main:main:612 - Stopped!
2023-06-11 18:39:44.527 | INFO | main:main:614 - обновить конфигурацию......
2023-06-11 18:39:44.531 | SUCCESS | main:main:618 - Обновлен идентификатор последнего прочитанного сообщения в конфигурационном файле,всего скачено 21, всего скаченных файлов 0


2 start
2023-06-11 20:13:03.193 | INFO | utils.meta:print_meta:22 - Device: CPython 3.8.10 - Telegram Media Downloader 2.1.9
2023-06-11 20:13:03.194 | INFO | utils.meta:print_meta:23 - System: Windows 10 (EN)
2023-06-11 20:13:04.501 | SUCCESS | main:main:591 - Запуск успешный (нажмите Ctrl + C для остановки)
2023-06-11 20:13:05.646 | SUCCESS | main:_check_download_finish:77 - Успешно скачано - K:\Exec\tangyoha-tmd\document\16862 - [RPF] Виделись! (H).fb2
2023-06-11 20:13:05.813 | SUCCESS | main:_check_download_finish:77 - Успешно скачано - K:\Exec\tangyoha-tmd\document\82878 - 03 Несущий бурю. Том III.fb2
...
2023-06-11 20:13:07.047 | SUCCESS | main:_check_download_finish:77 - Успешно скачано - K:\Exec\tangyoha-tmd\document\82887 - 06 Аокигахара.fb2
2023-06-11 20:13:08.642 | INFO | main:main:612 - Stopped!
2023-06-11 20:13:08.999 | INFO | main:main:614 - обновить конфигурацию......
2023-06-11 20:13:09.002 | SUCCESS | main:main:618 - Обновлен идентификатор последнего прочитанного сообщения в конфигурационном файле,всего скачено 10, всего скаченных файлов 0

Expected Behavior

the program should download each file only once, no more and no less

Current Behavior

the program is re-downloading the file, the one that was in the last message at the last start and has already been downloaded.

Possible Solution

No response

Steps to Reproduce

No response

Relevant log output

No response

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.