![python](https://habrastorage.org/r/w120/webt/5a/de/0e/5ade0efe6f5d5276653463.png)
Python
0
Вклад в тег
import telebot
class TelegramPost:
TOKEN = settings.config['TOKEN']
GROUP_ID = settings.config['GROUP_ID']
bot = telebot.TeleBot(TOKEN, parse_mode='HTML')
def post_channel(self, image_url, caption):
photo = open(image_url, 'rb')
self.bot.send_photo(self.GROUP_ID, photo=photo, caption=caption)