提示urllib无相关模块
C:\Users\defaultuser0\AppData\Local\Programs\pachong1\Scripts\python.exe C:/Users/defaultuser0/PycharmProjects/pachong/pachong1/spider_main.py
craw 1:http://baike.baidu.com
Traceback (most recent call last):
File "C:/Users/defaultuser0/PycharmProjects/pachong/pachong1/spider_main.py", line 37, in <module>
obj_spider.craw(root_url)
File "C:/Users/defaultuser0/PycharmProjects/pachong/pachong1/spider_main.py", line 19, in craw
html_cont = self.downloader.download(new_url)
File "C:\Users\defaultuser0\PycharmProjects\pachong\pachong1\html_downloader.py", line 9, in download
response = urllib.request.open()
AttributeError:
module 'urllib.request' has no attribute 'open'
Process finished with exit code 1