
爬虫
2c不高兴
一枚前端开发搬运工,面向api开发,百度谷歌搜索一键复制粘贴攻城狮
展开
-
python 爬虫(头像)
import reimport osimport requestsglobal ii = 0def get_one_page(url): response = requests.get(url) response.encoding = 'utf-8' html = response.text return htmldef get_urls(html): pattern = re.compile('href="(/touxiang/qinglv/.原创 2022-04-20 16:12:23 · 1551 阅读 · 0 评论 -
python 爬虫(表情包)
引入模块import requests //用于请求网页import re //正则表达式,用于解析筛选网页中的信息要爬的网址headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:98.0) Gecko/20100101 Firefox/98.0' }response = requests.get('https://qq.yh31.com/zjbq/',headers=headers) .原创 2022-04-20 15:32:26 · 1615 阅读 · 0 评论