Traceback (most recent call last):
File "C:\Users\ASUS\Desktop\爬虫\不同页面不同图片 - 副本.py", line 62, in <module>
download_mm()
File "C:\Users\ASUS\Desktop\爬虫\不同页面不同图片 - 副本.py", line 53, in download_mm
page_num=int(get_page(url))
File "C:\Users\ASUS\Desktop\爬虫\不同页面不同图片 - 副本.py", line 16, in get_page
req=urllib.request.urlopen(url,headers)
File "D:\Program Files\Python38\lib\urllib\request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "D:\Program Files\Python38\lib\urllib\request.py", line 525, in open
response = self._open(req, data)
File "D:\Program Files\Python38\lib\urllib\request.py", line 542, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "D:\Program Files\Python38\lib\urllib\request.py", line 502, in _call_chain
result = func(*args)
File "D:\Program Files\Python38\lib\urllib\request.py", line 1362, in https_open
return self.do_open(http.client.HTTPSConnection, req,
File "D:\Program Files\Python38\lib\urllib\request.py", line 1319, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "D:\Program Files\Python38\lib\http\client.py", line 1230, in request
self._send_request(method, url, body, headers, encode_chunked)
File "D:\Program Files\Python38\lib\http\client.py", line 1276, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "D:\Program Files\Python38\lib\http\client.py", line 1225, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "D:\Program Files\Python38\lib\http\client.py", line 1041, in _send_output
chunk = f'{len(chunk):X}\r\n'.encode('ascii') + chunk \
TypeError: can't concat str to bytes