![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python爬虫
Tag_sk
这个作者很懒,什么都没留下…
展开
-
【Python网络爬虫】python网络数据采集读书笔记(第一章)
python网络数据采集第一章 初见网络爬虫demo1初次体验,查找python的request模块,只导入一个urlopen函数,然后就可以获取到url所返回的页面中的内容了,这是爬虫的第一步#python3.x版本 #导入包 查找python的request模块,只导入一个urlopen函数 from urllib.request import urlopen #打开url html=urlop原创 2016-12-26 14:46:38 · 404 阅读 · 1 评论 -
【Python网络爬虫】python网络数据采集读书笔记(第二章)
python网络数据采集第二章 复杂HTML解析demo1这个demo展示了利用BS4,解析css来抽离出小说中的人物的登场次序。这个网址可以打开看看,也许你就明白作者的意图了。from urllib.request import urlopen from bs4 import BeautifulSoup #下面这个网址是作者弄的示例页面 html=urlopen('http://www.pytho原创 2016-12-26 16:11:35 · 404 阅读 · 0 评论 -
【Python网络爬虫】python网络数据采集读书笔记(第三章)
python网络数据采集第三章 开始采集demo1遍历单个域名from urllib.request import urlopen from bs4 import BeautifulSoup import re html=urlopen("http://en.wikipedia.org/wiki/Kevin_Bacon") bsobj=BeautifulSoup(html) for link in原创 2016-12-26 20:43:09 · 705 阅读 · 1 评论