|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
#为了突出问题,把ip代理部分代码删除了
def Agent_response(url):
rsp = request.urlopen(url,timeout = 8)
html = rsp.read().decode('utf-8')
js = json.loads(html)
return js
出现的错误有:
1.time out
2.URLError: <urlopen error Remote end closed connection without response>
3.由于目标计算机积极拒绝,无法连接
个人推测:
网络不稳定的问题,但是用浏览器打的开网页。纠结的啊
url 网址实例:
https://maps.googleapis.com/maps/api/place/search/json?location=41.935385,-87.696485&radius=1000&sensor=true&key=AIzaSyBMGzm-1zXeLX-QNi9N7ozRJWZlREyYEe4&types=accounting
程序访问google map api爬取数据
各位路过大佬求指导指导,互相学习,叩谢。 |
|