gpt4 book ai didi

python - 我得到 "RequestsDependencyWarning: urllib3 (1.25.3) or chardet (3.0.4) doesn' t 匹配支持的版本!”

转载 作者:行者123 更新时间:2023-12-03 23:10:59 30 4
gpt4 key购买 nike

我正在尝试下载 YouTube 视频并上传到电报

def start_callback(bot, update, args):
if len(args)==1:
search="https://www.youtube.com/results?search_query="+args[0]
else:
search="https://www.youtube.com/results?search_query="+("+".join(args))
print
response = requests.get(search)
page = response.text
soup = BeautifulSoup(page,"lxml")
links=[]
for i in soup.find_all("a",{"aria-hidden":"true"}):
links.append("https://www.youtube.com"+i.attrs['href'])

for i in links[:10]:
update.message.reply_text(i)
#bot.send_message(chat_id="@marks_channel", text=i)
sleep(1)
update.message.reply_text("top 10 youtube videos for the "+" ".join(args))

然后
start_handler = CommandHandler('ytsearch',start_callback, pass_args=True)
dispatcher.add_handler(start_handler)

当我在本地执行它时一切正常,但是,当我将它部署到 Heroku: Cloud Application Platform 时,我收到此警告。

RequestsDependencyWarning: urllib3 (1.25.3) or chardet (3.0.4) doesn't match a supported version!



我已经尝试更新 requests但它不会改变任何东西。

我也试过 RequestsDependencyWarning: urllib3 (1.9.1) or chardet (2.3.0) doesn't match a supported version但在 Heroku 中没有变化。

请帮忙 :/

最佳答案

我通过使用 pip 手动更新请求包解决了这个问题:

pip install --upgrade requests

关于python - 我得到 "RequestsDependencyWarning: urllib3 (1.25.3) or chardet (3.0.4) doesn' t 匹配支持的版本!”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57395105/

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