python中requests相关问题

请问如何将requests爬取的数据提取有用的信息,最好是正则。
(好答案必采纳!)

你想问什么???你都说了正则那就用正则提取啊

re 是python 提供的内置正则库,re中提供了多种正则匹配的函数

import re
resp = requests.get(url=xxx,headers=headers)
re.findall(r'\d',resp.text)