爬了一个之后就不爬了,错误提示:__init__() got an unexpected keyword argument 'from_Encoding'
2016-08-21
getcode() 200页面请求的状态值,分别有:200请求成功、303重定向、400请求错误、401未授权、403禁止访问、404文件未找到、500服务器错误
2016-08-21
from bs4 import BeautifulSoup
soup = BeautifulSoup(html_doc,'html.parser')
print('所有链接')
links = soup.find_all('a')
for link in links:
print(link.name,link["href"],link.get_text())
soup = BeautifulSoup(html_doc,'html.parser')
print('所有链接')
links = soup.find_all('a')
for link in links:
print(link.name,link["href"],link.get_text())
2016-08-20
Traceback (most recent call last):
File "C:\Users\cjj\workspace\imooc\test\test_bs4.py", line 39, in <module>
print p_node.name, p_node.get_text()
AttributeError: 'NoneType' object has no attribute 'name'
这到底是错在哪里了
File "C:\Users\cjj\workspace\imooc\test\test_bs4.py", line 39, in <module>
print p_node.name, p_node.get_text()
AttributeError: 'NoneType' object has no attribute 'name'
这到底是错在哪里了
2016-08-19
百度经验置顶那个下载安装包到Python3.5目录的方法死活都识别你在把BeautifulSoup4往Python2.7里安,换4.4.1,4.4.5都这么坑,不知道什么原理。还是照着视频里老老实实来,给安好了
2016-08-18
https://www.crummy.com/software/BeautifulSoup/bs4/doc/#installing-beautiful-soup
2016-08-17