tangyoha / telegram_media_downloader

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

[Bug]: don't work hiddent number +888 #127

Closed GitBib closed 10 months ago

GitBib commented 10 months ago

telegram_media_downloader version or commit

2.2.3

What OS are you seeing the problem on?

Mac

Python Version

3.12.0

What happened?

The account has a hidden number telegram (+888). But pyrogram does not know how to handle this number.

Expected Behavior

Accounts with the number +888 work.

Current Behavior

Now ValueError. ValueError: <class 'pyrogram.raw.types.auth.code_type_fragment_sms.CodeTypeFragmentSms'> is not a valid NextCodeType

next_type=enums.NextCodeType(type(sent_code.next_type)) if sent_code.next_type else None, │ │ │ │ │ └ <member 'next_type' of 'SentCode' objects> │ │ │ │ └ pyrogram.raw.types.auth.SentCode(type=pyrogram.raw.types.auth.SentCodeTypeApp(length=5), phone_code_hash='80000000a00f00bafa'... │ │ │ └ <member 'next_type' of 'SentCode' objects> │ │ └ pyrogram.raw.types.auth.SentCode(type=pyrogram.raw.types.auth.SentCodeTypeApp(length=5), phone_code_hash='80000000a00f00bafa''... │ └ <enum 'NextCodeType'> └ <module 'pyrogram.enums' from '.../telegram_media_downloader/env/lib/python3.12/site-...

Possible Solution

No response

Steps to Reproduce

No response

Relevant log output

No response

GitBib commented 10 months ago

the problem can be solved by upgrading pyrogram to or above 2.0.106.

tangyoha commented 10 months ago

@GitBib hi,try this version. pip3 install https://github.com/tangyoha/pyrogram/archive/refs/heads/master.zip

GitBib commented 10 months ago

@tangyoha It didn't work for me with this version.

tangyoha commented 10 months ago

@GitBib hi,this is above v2.0.106