![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
爬虫
ErrorMaker...
这个作者很懒,什么都没留下…
展开
-
re正则表示式爬取网页
#爬取豆瓣短评import requestsimport reheaders = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.25 Safari/537.36 Core/1.70.3676.400 QQBrowser/10.5.3738.400'}url = 'https://book.douban.com/subj原创 2021-03-24 17:04:36 · 101 阅读 · 0 评论 -
beautiful soup爬取网页
import requestsfrom bs4 import BeautifulSoupheaders = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.25 Safari/537.36 Core/1.70.3676.400 QQBrowser/10.5.3738.400'}url = 'https://book.d.原创 2021-03-24 16:37:15 · 105 阅读 · 0 评论