Telegram-bot (telepot api): Is it possible to send an image directly from URL without saving it
问题 Im writing a telegram bot using the python telepot api. I'm now stuck at the point where I want to send a picture which directly comes from an URL without storing it locally. Telepot provides the following instruction to send a photo: >>> f = open('zzzzzzzz.jpg', 'rb') # some file on local disk >>> response = bot.sendPhoto(chat_id, f) Now im using f = urllib2.urlopen('http://i.imgur.com/B1fzGoh.jpg') bot.sendPhoto(chat_id, f) The problem here is that urllib2.urlopen('url') provide me file