08 2019 档案

摘要:官方文档:https://www.crummy.com/software/BeautifulSoup/bs4/doc.zh/ 使用前需要先安装模块,并安装解析器 pip install beautifulsoup4 pip install lxml pip install html5lib 安装完成 阅读全文
posted @ 2019-08-13 17:05 ForLivetoLearn 阅读(191) 评论(0) 推荐(0) 编辑
摘要:python使用正则表达式之前需要先倒入re模块 import re 可选标志位 re.A ASCII,使得 \w,\W,\b,\B,\s 和 \S 只匹配 ASCII 字符,而不匹配完整的 Unicode 字符。这个标志仅对 Unicode 模式有意义,并忽略字节模式。 re.I IGNORECA 阅读全文
posted @ 2019-08-12 16:58 ForLivetoLearn 阅读(1294) 评论(0) 推荐(0) 编辑
摘要:python使用代理的方法有两种 1. 2. 示例代码: 阅读全文
posted @ 2019-08-06 14:35 ForLivetoLearn 阅读(10483) 评论(0) 推荐(0) 编辑
摘要:添加头部信息有两种方法 1.通过添加urllib.request.Request中的headers参数 2.通过urllib.request.Request的add_header方法添加 360翻译示例代码: 阅读全文
posted @ 2019-08-06 11:35 ForLivetoLearn 阅读(8770) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示