Repository navigation
|
假如,我有一批下载链接 需要一个个手动的发给 bot 我知道可以不用等上一条下载完成,再发送下一条 但是我不知道,bot 允许等待下载任务最大是多少 我每次都是五个链接一组下载 有没有什么更好的处理方式? |
Answered by
skrik2
Jan 9, 2026
Replies: 2 comments
|
和 AI 讨论了一下 实际上这个问题很好解决 就是用 ai vibe 一个程序,检测 bot 消息,依次发送链接 |
0 replies
Answer selected by
skrik2
|
你好!关于批量下载链接的问题,有几个更好的处理方式: 方案1:使用脚本批量发送 from pyrogram import Client
import time
api_id = "your_api_id"
api_hash = "your_api_hash"
bot_username = "@your_bot_username"
links = [
"https://xxxxx",
"https://xxxxx",
"https://xxxxx",
]
with Client("my_account", api_id, api_hash) as app:
for link in links:
app.send_message(bot_username, link)
time.sleep(0.5) # 避免触发限制方案2:一次性发送多个链接 直接把多个链接放在一条消息中发送给机器人。 关于任务队列限制:
max_download_task: 10 # 增加并发数
max_concurrent_transmissions: 3建议:
|
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
和 AI 讨论了一下
实际上这个问题很好解决
就是用 ai vibe 一个程序,检测 bot 消息,依次发送链接