Traceback (most recent call last):
File "C:\Users\admin\AppData\Local\Programs\Python\Python38\爬图片.py", line 49, in <module>
download_mm()
File "C:\Users\admin\AppData\Local\Programs\Python\Python38\爬图片.py", line 45, in download_mm
img_addrs = find_page(page_url)
File "C:\Users\admin\AppData\Local\Programs\Python\Python38\爬图片.py", line 19, in find_page
html = url_open(url).decode('utf-8','ignore')
File "C:\Users\admin\AppData\Local\Programs\Python\Python38\爬图片.py", line 7, in url_open
res = urllib.request.urlopen(url)
File "C:\Users\admin\AppData\Local\Programs\Python\Python38\lib\urllib\request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "C:\Users\admin\AppData\Local\Programs\Python\Python38\lib\urllib\request.py", line 531, in open
response = meth(req, response)
File "C:\Users\admin\AppData\Local\Programs\Python\Python38\lib\urllib\request.py", line 640, in http_response
response = self.parent.error(
File "C:\Users\admin\AppData\Local\Programs\Python\Python38\lib\urllib\request.py", line 569, in error
return self._call_chain(*args)
File "C:\Users\admin\AppData\Local\Programs\Python\Python38\lib\urllib\request.py", line 502, in _call_chain
result = func(*args)
File "C:\Users\admin\AppData\Local\Programs\Python\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 404: Not Found
b = html.find('12',a)改成b = html.find('>',a) 就变这样了 不过没改之前错的更复杂(把我整个电脑整卡了) |