python-telegram
python-telegram copied to clipboard
How to download photo from messagePhoto?
I want to save photo from content type messagePhoto but it's not work
for message in response.update['messages']:
if message['content']['@type'] == 'messagePhoto':
stats_data[message['id']] = message['content']['text']['text']
photo_id = message['content']['photo']['sizes'][0]['photo']['id']
photo_data = telegram.call_method(
method_name = 'downloadFile',
params = {'file_id': photo_id}
)
photo_data.wait()
from_message_id = message['id']
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.