python - 当我尝试发出 http 请求时,它显示为连接错误,而之前它没有显示为连接错误
问题描述
import json
import requests
country = 'GB'
url = ('http://kitkabackend.eastus.cloudapp.azure.com:5010/highscore/crowns/list?country='+country)
r = requests.get(url)
print(r.text)
相同的代码之前为我工作了一段时间,但现在它突然给我一个像以前一样的错误。我尝试在请求时添加标头,但这也没有解决错误。(我是使用 repl.it 的初学者)
控制台上显示错误 - raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response
解决方案
推荐阅读
- mysql - mysql中的USING()函数有什么用?
- spring - 禁用弹簧集成指标
- python - 龙卷风中的私人消息
- vba - 我需要减小散点图大小以允许 -90 个标签并在 VBA 中添加错误栏
- python-3.x - 如何使用 Beautifulsoup 和 Selenium 依次选择下拉菜单时动态生成的数据?
- c# - 如何在 PowerPoint 形状中存储数据?
- c# - C# 加载 DLL 失败
- image - 如何在python中将二维数组转换为RGB图像?
- python - 在 MDTab 中显示来自 API 请求的数据
- javascript - 按钮在固定位置 div 内变得无响应