这是我第一次写博客,有不足的地方请见谅 先放码 import requests import re import os url = ” #填入目标网址 head = {‘User-Agent’: ‘Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.25 Safari/537.36 Core/1.70.3741.400 QQBrowser/10.5.3863.400’} while True: #如果出错就会进入循环 try: response = request