bellingcat / telegram-phone-number-checker

Check if phone numbers are connected to Telegram accounts.
https://pypi.org/project/telegram-phone-number-checker/
MIT License
1.02k stars 172 forks source link

Add profile photo to response #31

Closed xstu25 closed 6 days ago

xstu25 commented 1 month ago

Hello. Thanks a lot for your amazing script.

Is there a way to access to Telegram profile picture of the account found ?

Thanks for reply.

GalenReich commented 1 month ago

This is a good idea. It is very possible as Telethon returns the UserProfilePhoto in its existing response. There is also the download_profile_photo method that would be suitable for this.

The behaviour should be accessed through an optional flag (that defaults to not downloading photos), something like:

telegram-phone-number-checker --download-profile-photos --phone-numbers +1234567890

The changes would likely need to be made in this block: https://github.com/bellingcat/telegram-phone-number-checker/blob/80d5eb1723047fedbcecabdc21fcf564a95dab63/telegram_phone_number_checker/main.py#L57-L82

We would welcome a PR to implement this! 🎉

DouglasKrouth commented 1 week ago

Added here. https://github.com/bellingcat/telegram-phone-number-checker/pull/38