I would like to get a photo from my url. Trying to create it ,then use .get()
and convert it into :BytesIO()
img = Image.fromarray(srcData)
fp = 'https://telegram.org/new.png'
response = requests.get(fp)
f = BytesIO(response.content)
f.seek(0)
f=Image.open(f)
Why do I get an error, which is:
cannot identify image file _io.bytesio
Then try to send it:
bot.send_photo(chat_id=chat_id, photo=f)