我正在使用python中的selenium刮取一个网站,当我在windows上运行同样的脚本时,我得到了想要的结果,但在ubuntu 16.04中,当我运行同样的脚本时,却出现了错误。
File "/usr/lib/python2.7/httplib.py", line 402, in_read_status raise BadStatusLine(line) BadStatusLine: '' 谁能给我一个主意,为什么会出现这个错误? 谢谢 :)
谁能给我一个主意,为什么会出现这个错误?
谢谢 :)
python
selenium
http
ubuntu
web-scraping
grvkgp 发布于 2018-07-04
1 个回答
undetected Selenium 发布于 2018-07-04
已采纳
0 人赞同
这个错误信息... File "/usr/lib/python2.7/httplib.py", line 402, in_read_status raise BadStatusLine(line) BadStatusLine ...意味着糟糕的状态线被提出来了,因为服务器回应了一个我们不理解的HTTP状态代码。 httplib.糟糕的状态线 exception httplib.糟糕的状态线 is defined in Python2.x - httplib / Python3.x - http.client模块的子类,是HTTPException如果服务器响应的HTTP状态码是我们不理解的,就会引发这个问题。 Reasons and Solutions 看到这一点的背后可能有很多原因。httplib.糟糕的状态线例外。按照为什么我在python中得到这个错误?(httplib)一些潜在的原因和解决方案是。 You may be trying to use http:// instead of https:// The URL string may be containing a trailing newline character. So make sure that your URL are stripped of any leading or trailing special characters. The Web Server may be down and Not Responding.
这个错误信息...
File "/usr/lib/python2.7/httplib.py", line 402, in_read_status raise BadStatusLine(line) BadStatusLine ...意味着糟糕的状态线被提出来了,因为服务器回应了一个我们不理解的HTTP状态代码。 httplib.糟糕的状态线 exception httplib.糟糕的状态线 is defined in Python2.x - httplib / Python3.x - http.client模块的子类,是HTTPException如果服务器响应的HTTP状态码是我们不理解的,就会引发这个问题。 Reasons and Solutions 看到这一点的背后可能有很多原因。httplib.糟糕的状态线例外。按照为什么我在python中得到这个错误?(httplib)一些潜在的原因和解决方案是。 You may be trying to use http:// instead of https:// The URL string may be containing a trailing newline character. So make sure that your URL are stripped of any leading or trailing special characters. The Web Server may be down and Not Responding.
...意味着糟糕的状态线被提出来了,因为服务器回应了一个我们不理解的HTTP状态代码。
exception httplib.糟糕的状态线 is defined in Python2.x - httplib / Python3.x - http.client模块的子类,是HTTPException如果服务器响应的HTTP状态码是我们不理解的,就会引发这个问题。
看到这一点的背后可能有很多原因。httplib.糟糕的状态线例外。按照为什么我在python中得到这个错误?(httplib)一些潜在的原因和解决方案是。
http://
https://