讲的很清晰,第一看爬虫,稳!我自认为属于比较笨的,不知道说听不懂的有没有经过大脑思考......
学习编程,自己不善于思考吃枣药丸。
学习编程,自己不善于思考吃枣药丸。
2018-03-12
Traceback (most recent call last):
File "C:/Users/lenovo/.PyCharm2017.3/config/scratches/scratch.py", line 9, in <module>
from_encoding='utf-8'
TypeError: 'module' object is not callable
报错,原因是模块无法随时调取。谁能帮我一下
File "C:/Users/lenovo/.PyCharm2017.3/config/scratches/scratch.py", line 9, in <module>
from_encoding='utf-8'
TypeError: 'module' object is not callable
报错,原因是模块无法随时调取。谁能帮我一下
2018-03-11
报错:
UserWarning: You provided Unicode markup but also provided a value for from_encoding. Your from_encoding will be ignored.
解决方法:
soup = BeautifulSoup(html_doc,"html.parser")
这一句中删除【from_encoding="utf-8"】
原因:
python3 缺省的编码是unicode, 再在from_encoding设置为utf8, 会被忽视掉,去掉【from_encoding="utf-8"】这一个好了
UserWarning: You provided Unicode markup but also provided a value for from_encoding. Your from_encoding will be ignored.
解决方法:
soup = BeautifulSoup(html_doc,"html.parser")
这一句中删除【from_encoding="utf-8"】
原因:
python3 缺省的编码是unicode, 再在from_encoding设置为utf8, 会被忽视掉,去掉【from_encoding="utf-8"】这一个好了
2018-03-08
现在是爬完一条直接到http://baike.baidu.com/view/10812319.htm锁定词条了吧?
2018-03-02