gpt4 book ai didi

python-3.x - 无法将音频上传到 Telegram 错误请求 : failed to get HTTP URL content

转载 作者:行者123 更新时间:2023-12-05 08:11:54 24 4
gpt4 key购买 nike

我有 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"}']"

我不明白为什么,因为我检查了大小和类型,一切都很清楚,我在 Telegram API 的文档中找不到更多的限制。谁知道错误的原因是什么?

链接到 mp3 - http://data3.api.xn--41a.ws/vkp/cs9-5v4.userapi.com/p15/51bdb5ec5899ed.mp3

最佳答案

检查文件大小。

Provide Telegram with an HTTP URL for the file to be sent. Telegram will download and send the file. 5 MB max size for photos and 20 MB max for other types of content.

Post the file using multipart/form-data in the usual way that files are uploaded via the browser. 10 MB max size for photos, 50 MB for other files.

关于python-3.x - 无法将音频上传到 Telegram 错误请求 : failed to get HTTP URL content,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45492171/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com