![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
py爬虫
stevezhao6
这个作者很懒,什么都没留下…
展开
-
Python期末课程设计
python课程设计,主要用xpath,和mongodb存取数据会词道云创新功能,不知道的自己百度下为部分代码import requests# mongodbimport pymongoimport self as self# 解析html的库from lxml import html, etreeimport jiebafrom PIL import Imagefrom wordcloud import WordCloudheaders = { 'User-Ag原创 2021-06-21 23:03:16 · 3556 阅读 · 0 评论 -
python获取页面编码
首先安装requests库和 bs4库# 获取页面link ="http://www.santostang.com/"headers = { 'User-Agent':'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36 QIHU 360SE'}r = requests.get(link,headers=headers)原创 2021-05-17 10:29:59 · 333 阅读 · 0 评论 -
python报错bs4.FeatureNotFound: Couldn‘t find a tree builder with the features you requested: lxml.
soup = BeautifulSoup(r.text,"lxml")改为soup = BeautifulSoup(r.text,"html.parser")完美解决原创 2021-05-15 21:23:16 · 133 阅读 · 0 评论