4.Python4:requests

目录

1.requests爬虫原理

(1)requests是一个python的第三方库,主要用于发送http请求

2.正则表达式


python 复制代码
#正则表达式
import re,requests
str1='aceace'
#A(.*?)B,匹配A和B之间的值
print(re.findall('a(.*?)e',str1))


python 复制代码
import re,requests
str2='''hello computer
world
'''
print(re.findall('hello(.*?)world',str2))
print(re.findall('hello(.*?)world',str2,re.S))


相关推荐
_Jimmy_1 小时前
Agent 溯源精度提升方案
人工智能·python·langchain
SamChan903 小时前
在Web应用中集成PDF多语言翻译功能:PDFTranslator API实战指南
前端·python·ai·pdf·yapi·机器翻译
天天进步20153 小时前
Python全栈项目--智能办公自动化系统
开发语言·python
颜酱3 小时前
09 | 重构项目结构
人工智能·python·langchain
Sisphusssss5 小时前
香橙派5plus GPIO
linux·python·ubuntu
颜酱5 小时前
08 | 把维度值同步到 Elasticsearch(生成阶段)
人工智能·python·langchain
久久学姐6 小时前
基础转码学 AI:Java+Python 双语言入门,3 个月可落地实战项目
java·python·ai·转码·实战项目
ZHOU_WUYI6 小时前
4. light wam 模型loss计算过程
开发语言·人工智能·python
nwsuaf_huasir6 小时前
【无标题】
python
Python私教8 小时前
Codex 写出的代码能跑却算错钱:我用 3 个测试拆穿一次 AI 编程幻觉
python·单元测试·ai编程