![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python爬虫学习笔记
文章平均质量分 86
wkylp
这个作者很懒,什么都没留下…
展开
-
python爬虫——利用requests库re正则表达式获取购物网站指定商品信息
学习和练习使用,简单爬取信息内容。经过对taobao url链接的分析,比如:我们搜索“耳机”就会看到这样的url:https://s.taobao.com/search?q=%E8%80%B3%E6%9C%BA&imgfile=&commend=all&ssid=s5-e&search_type=item&sourceId=tb.index&spm...原创 2018-04-27 22:12:01 · 2678 阅读 · 2 评论 -
python爬虫——利用requests库BeautifulSoup定向爬取网页内容写入txt文件
简单爬取“最好大学网2018大学排名”,爬取结果存入指定 目录下txt文件中爬取对象 url = http://www.zuihaodaxue.cn/zuihaodaxuepaiming2018.html工具:python3.6 IDLE程序总体上也是分为三步:一、requests.get()获取url信息,并返回r.text;二、用BeautifulSoup解析r.text内容,后去标签中的信息...原创 2018-04-27 21:53:49 · 9013 阅读 · 2 评论 -
python爬虫——利用requests库BeautifulSoup简单爬取网页上照片—代码完善
接着上一篇博客的代码,对细节作了一些修改和完善,并用pyinstaller -F XXX.py生成.exe应用程序,可直接运行。爬取对象url = http://cmee.nwafu.edu.cn/szdw/gjzcry/index.htm下面给出所有代码:import requestsimport bs4import osfrom bs4 import BeautifulSoupimpo...原创 2018-04-27 21:22:21 · 1901 阅读 · 2 评论 -
python爬虫——利用requests库BeautifulSoup简单爬取网页上照片
刚开始接触网络爬虫,记录自己的学习历程。开发环境:python 3.6 IDLE 爬取对象及任务:爬取学院网站上教师的信息,将教师照片保存在某一文件下。url = 'http://cmee.nwafu.edu.cn/szdw/gjzcry/index.htm'程序代码:import requestsimport bs4import osfrom bs4 import BeautifulSou...原创 2018-04-20 20:02:57 · 1646 阅读 · 0 评论