有一个电报机器人从 VK 组解析墙并将其发送到电报频道。
当您尝试运行它时,它会成功解析墙,但无法将其发送到频道。
Traceback (most recent call last):
File "main.py", line 208, in <module>
check_posts_vk()
File "main.py", line 126, in check_posts_vk
bot.send_message(CHANNEL, text + '[](' + image_url + ')', parse_mode='Markdown')
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 1: ordinal not in range(128)
错误代码:
if len(images) > 0:
image_url = str(max(img["sizes"], key=lambda size: size["type"])["url"])
bot.send_message(CHANNEL, text + '[](' + image_url + ')', parse_mode='Markdown')
# между квадратными скобками стоит world joiner. М.б. из-за него еррорит?
帮助,普利兹