![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
爬虫
文章平均质量分 59
Coby_Wang
I'm a tester, just a tester who wants to become a real tester!
展开
-
抓取中国大学排名榜
问题:抓取最好大学网上中国大学排名榜。网址:最好大学网 实现输出: 要求:使用requests库和BeautifulSoup库实现。# scrapy the rank of China universityimport requestsfrom bs4 import BeautifulSoupimport bs4# 获取内容def getText(url): he...原创 2018-06-04 16:13:56 · 379 阅读 · 0 评论 -
抓取福布斯排行榜
问题:使用request库和BeautifulSoup抓取福布斯排行榜,并将其按照表格形式打印出来 网址:https://www.phb123.com/renwu/fuhao/20802.html 实现:import requestsfrom bs4 import BeautifulSoupimport bs4def getText(url): headers = {'us...原创 2018-06-07 20:37:34 · 649 阅读 · 0 评论 -
[转载]UserAgent整理
User Agent是浏览器用于 HTTP 请求的用户代理头的值。更换User Agent能更好的模拟出不同的系统和浏览器信息。AndroidNameUser AgentNexus 7 (Tablet)Mozilla/5.0 (Linux; Android 4.1.1; Nexus 7 Build/JRO03D) AppleWebKit/535.19 (KHTML, like G...转载 2018-06-08 23:00:38 · 574 阅读 · 0 评论 -
爬取淘宝商品名称及价格
问题:使用request库和re库爬取淘宝网某种商品信息,并打印出其名称和价格 分析: 1.确定淘宝网搜索商品网址及robots协议 2.分析实现步骤: A:使用request库爬取信息 B:使用re库查找信息-findall()函数 C:打印 3.明确实现难点:分页 在确定淘宝网搜索商品网址为:https://s.taobao.com/search?q=?...原创 2018-06-09 22:27:02 · 1250 阅读 · 0 评论