解决中文编译失败在文件头部添加:# -*- coding: cp936 -*-或
# -*- coding: utf-8 -*
# -*- coding: utf-8 -*
2018-01-17
https://www.crummy.com/software/BeautifulSoup/bs4/doc/#installing-beautiful-soup
2018-01-17
对着代码打,然后换成python3版本的还是会报错呀
File "first.py", line 1, in <module>
from urllib import request
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\urllib\request.py", line 84, in <module>
File "first.py", line 1, in <module>
from urllib import request
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\urllib\request.py", line 84, in <module>
2018-01-17
<textarea id="js-pl-textarea" class="js-placeholder" placeholder="扯淡、吐槽、表扬、鼓励……想说啥就说啥!"></textarea>
2018-01-15
最赞回答 / 慕婉清5269197
在html_parser模块中links = soup.find_all('a', href=re.compile(r'/view/\d+\.htm')) 百度百科修改了页面只需修改爬取规则 把view改成item 再把/\d+\.htm 去掉就能匹配新的url了
2018-01-14