我有 mp3 的工作 url,并且我正在尝试通过此 url 将音频发送到 Telegram。它有时会起作用,但大多数时候都会出错
"A request to the Telegram API was unsuccessful. The server returned HTTP 400
Bad Request. Response body:
[b'{"ok":false,"error_code":400,"description":"Bad Request: failed to get HTTP
URL content"}']"
Run Code Online (Sandbox Code Playgroud)
我不明白为什么,因为我检查了大小和类型,一切都很清楚,我在 Telegram API 文档中找不到更多限制。谁知道错误原因是什么?
链接到 mp3 - http://data3.api.xn--41a.ws/vkp/cs9-5v4.userapi.com/p15/51bdb5ec5899ed.mp3
python-3.x telegram python-telegram-bot telegram-bot telegram-webhook
电报 api 的一些奇怪的事情。我正在尝试从电报机器人发送音频并顺便更改表演者和标题,但我不能。首先我以为我犯了一个错误,但不是!我试图从浏览器搜索行做同样的事情,因为没有机会做错什么,也没有结果!也许你可以尝试做同样的事情?这会很棒,因为我不知道出了什么问题。我正在尝试使用 pyTelegramBotAPI 在 Python 上执行此操作。例如代码:
import telebot
import const
#??????????? ? ????
bot = telebot.TeleBot(const.token)
@bot.message_handler(content_types=["text"])
def handle_command(message):
a = bot.send_audio(message.from_user.id, musicurl, caption=None, duration=None, performer="Pharik", title="hfdhdfh",
reply_to_message_id=None)
print(a.audio.performer)
print(a.audio.title)
bot.polling(none_stop=True, interval=0)
Run Code Online (Sandbox Code Playgroud)