|
楼主 |
发表于 2021-11-1 14:55:27
|
显示全部楼层
我改了之后又报错了
Traceback (most recent call last):
File "C:/Users/Lenovo/PycharmProjects/pythonProject8/venv/Scripts/爬虫课后作业.py", line 27, in <module>
main()
File "C:/Users/Lenovo/PycharmProjects/pythonProject8/venv/Scripts/爬虫课后作业.py", line 13, in main
responrs = urllib.request.urlopen(each_url)
File "C:\Program Files\Python38\lib\urllib\request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "C:\Program Files\Python38\lib\urllib\request.py", line 531, in open
response = meth(req, response)
File "C:\Program Files\Python38\lib\urllib\request.py", line 640, in http_response
response = self.parent.error(
File "C:\Program Files\Python38\lib\urllib\request.py", line 569, in error
return self._call_chain(*args)
File "C:\Program Files\Python38\lib\urllib\request.py", line 502, in _call_chain
result = func(*args)
File "C:\Program Files\Python38\lib\urllib\request.py", line 649, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 418: |
|