![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python爬虫
chenghq666
这个作者很懒,什么都没留下…
展开
-
python爬虫学习(第四爬)
今天来爬取壁纸图片url = "http://www.bizhi88.com/"还是先获取页面源代码,找到每张图片具体的链接url = "http://www.bizhi88.com/"headers = { "user-agent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0"}resp = requests.get(url=url,headers=headers)原创 2021-08-07 14:17:23 · 86 阅读 · 0 评论 -
python爬虫学习(第三爬)
爬取小说(用BeautifulSoup爬)url=http://www.bixiange.me/wxxz/3976/先来常规操作url = "http://www.bixiange.me/wxxz/3976/index/1.html"headers = { "user-agent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0"}resp = requests.get(u原创 2021-08-06 17:26:33 · 736 阅读 · 0 评论 -
python爬虫学习(第一爬)
爬取豆瓣电影Top250用python爬取的原因是库函数较多,比较方便。首先下载爬虫需要的库函数pip3 install requestspip3 install lxmlpip3 install BeautifulSoup豆瓣Top250的url=https://movie.douban.com/top250ctrl+u可以查看页面源代码,也可以右键点击检查(如图)首先先获取页面源代码import requestsimport timefrom requests.a原创 2021-08-05 23:25:32 · 191 阅读 · 0 评论 -
python爬虫学习(第二爬)
爬取吉林大学官网新闻信息日常获取页面源代码url = "https://news.jlu.edu.cn/jdxw/xykx.htm"headers = { "user-agent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0"}resp = requests.get(url,headers=headers)print(resp.text)会出现报错request原创 2021-08-06 12:58:28 · 130 阅读 · 0 评论