Е
Size: a a a
Е
АБ
@bot.message_handler(content_types=["photo"])
def photo(message):
file_info = bot.get_file(message.photo[len(message.photo)-1].file_id)
downloaded_file = bot.download_file(file_info.file_path)
S
q
Е
АБ
S
photo_url
= message.photo
[0
].get_url
()download_photo
= urllib.request.urlopen
(photo_url
).read
()open
('somepic.png',
"wb") as file_stream
:file_stream.write
(download_photo
)D
D
S
photo_url
= message.photo
[0
].get_url
()download_photo
= urllib.request.urlopen
(photo_url
).read
()open
('somepic.png',
"wb") as file_stream
:file_stream.write
(download_photo
)D
S
photo_url
= message.photo
[0
].get_url
()download_photo
= urllib.request.urlopen
(photo_url
).read
()open
('somepic.png',
"wb") as file_stream
:file_stream.write
(download_photo
)АБ
photo_url
= message.photo
[0
].get_url
()<bound method Downloadable.get_url of <aiogram.types.photo_size.PhotoSize object at 0x7f24a62cdf10>>
S
G
photo_url
= message.photo
[0
].get_url
()download_photo
= urllib.request.urlopen
(photo_url
).read
()open
('somepic.png',
"wb") as file_stream
:file_stream.write
(download_photo
)S
F
q
S
G