简体   繁体   中英

how to send photo correctly by url using telegram api?

I made a telegram bot which sends photo by URL with parse_mode='HTML' .Ia also using pyTelegramBotAPI wrapper. So I tried putting some photo URL and test if the bot can send the image. From my local server everything works fine , but when i am trying to send from my pythonanywhere it doesn't load the image in the channel, but only show the link. How to make the image correctly displayed in a post ?

code example :

 x1= " "'<a href="'+'http://crm.rcrealty.ru/upload/gallery_images/7ac1ceed-4103-3794-917b-59ac83c5735f/c626686f-a9e8-781f-1a5f-59ac876e7e5b.jpeg'+'">.</a>'
bot.send_message('@itvacancies',x1,parse_mode='HTML')

It works on me, you can try this inline bot:

@Sean_Bot Markdown [.](http://crm.rcrealty.ru/upload/gallery_images/7ac1ceed-4103-3794-917b-59ac83c5735f/c626686f-a9e8-781f-1a5f-59ac876e7e5b.jpeg)

@Sean_Bot HTML <a href="http://crm.rcrealty.ru/upload/gallery_images/7ac1ceed-4103-3794-917b-59ac83c5735f/c626686f-a9e8-781f-1a5f-59ac876e7e5b.jpeg">.</a>

w

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM