摘要: 1、用bs4爬壁纸网 import requestsfrom bs4 import BeautifulSoup # 导入BeautifulSoupfrom urllib.parse import urljoin # 专门用来做url路径拼接的import timeheader = { "user-a 阅读全文
posted @ 2023-11-08 12:58 干it的小张 阅读(55) 评论(0) 推荐(0) 编辑
摘要: 1、查找所有:结果 = re.findall(正则, 字符串) => 返回列表,用法:r""专业写正则的。 没有转义的烦恼,result = re.findall(r"\d+", "我有1000万,不给你花,我有1块我给你") 2、结果 = re.finditer(正则, 字符串) => 返回迭代器 阅读全文
posted @ 2023-11-08 12:30 干it的小张 阅读(51) 评论(0) 推荐(0) 编辑