
爬虫
tangab
这个作者很懒,什么都没留下…
展开
-
爬虫 re模块和正则表达式
可以用来规定爬取字段的特定标准的文字,影评,电话啥的最全常用正则表达式大全_ZhaoYingChao88的博客-优快云博客_常用正则表达式一、校验数字的表达式1. 数字:^[0-9]*$2. n位的数字:^\d{n}$3. 至少n位的数字:^\d{n,}$4. m-n位的数字:^\d{m,n}$5. 零和非零开头的数字:^(0|[1-9][0-9]*)$6. 非零开头的最多带两位小数的数字:^([1-9][0-9]*)+(.[0-9]{1,2})?$7. 带1-2位小数的正数或负数:^(\原创 2022-05-31 12:03:27 · 181 阅读 · 0 评论 -
python爬虫bs4
爬虫 BS4库原创 2022-05-26 15:21:33 · 478 阅读 · 0 评论 -
python爬虫 urllib.request
用来模拟浏览器请求网页服务器urllib.request.urlopen(headers)用来获取网页返回值import urllib.request#获取一个get请求response = urllib.request.urlopen("http://www.baidu.com")print(response.read().decode('utf-8')) #对获取到的网页源码进行utf-8解码#获取一个post请求import urllib.parsedata = by原创 2022-05-26 14:01:58 · 1049 阅读 · 0 评论