![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
爬虫
猪1妖
这个作者很懒,什么都没留下…
展开
-
# 巨小白 爬虫记录
爬虫记录 从下面的连接学习的 https://www.jqhtml.com/13264.html 一.Request 用法 import requests response = requests.get('http://www.baidu.com/') 上式response得到了baidu的html 再利用 print(response.text) 就可以输出baidu的HTML了 带输出参...原创 2019-04-18 10:12:07 · 84 阅读 · 0 评论 -
巨小白爬虫2
豆瓣爬虫纪律 关于find()和find_all() import requests from bs4 import BeautifulSoup resp = requests.get('https://book.douban.com/top250?start=0') soup = BeautifulSoup(resp.text,'html.parser') alldiv = soup.fin...原创 2019-04-18 10:12:23 · 145 阅读 · 0 评论 -
Couldn't find a tree builder with the features you requested: lxml.解决方案
我的情况如下: 我在pip install lxml的时候,系统告诉我已经装好了,但是在.py文件调试跟cmd 的python调试的时候,lxml又不能使用, 会报错bs4.FeatureNotFound: Couldn’t find a tree builder with the features you requested: lxml. Do you need to install a par...原创 2019-04-18 10:12:42 · 6525 阅读 · 2 评论 -
小白爬虫3,爬取图片
今天来爬一爬图片 学习链接来自于 https://www.jqhtml.com/13393.html 爬的图片 http://i.jandan.net/ooxx 中的1-33页 现在看1-33页的表达方式 http://jandan.net/ooxx/ page-32 仅仅只是page-32 这一块变了,所以目的很明确,for循环一下就好了 但是不可能每次爬虫都看一下有几页,所以要他自动抓取 对...原创 2019-04-18 17:06:45 · 257 阅读 · 0 评论 -
爬虫将文件保存到制定路径
爬虫将文件保存到制定路径 利用os库的方式 def mkdir(path): # os.path.exists(name)判断是否存在路径 # os.path.join(path, name)连接目录与文件名 isExists = os.path.exists(os.path.join("E:\爬虫\weibo",path)) if not isExists: print(...原创 2019-04-18 23:39:26 · 3651 阅读 · 0 评论