![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
python相关
zelada
这个作者很懒,什么都没留下…
展开
-
python3中关于encode与decode的使用方法,且含有(.content和.text方法),解决小说爬虫的中文乱码问题
python3中关于encode与decode的使用方法,且含有(.content和.text方法),解决小说爬虫的乱码问题python3中,单独的decode不能使用,若没有同时安装Python2与python3。本人参考了居多博主资料后,使用以下方法可解决,例如:import requestsimport urllib3urllib3.disable_warnings() #去除...原创 2019-09-21 22:22:20 · 4263 阅读 · 0 评论 -
.find()和.find_all()和.select()和re.compile()在BeautifulSoup方法的使用
标题**.find()和.find_all()和.select()和re.compile()在BeautifulSoup方法的使用**.find_all()是查询所有包含节点名称和属性的所有节点信息find_all(name, attrs={}, recursive=True, text=None, limit=None, **kwargs)name:查询节点的名称attrs:查询节...原创 2019-09-24 11:27:04 · 1029 阅读 · 0 评论