import requests import re import os import time headers = { "user-agent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.85 Safari/537.36", "host": 'www.cosplay8.com' } def get_list(url): """ 获取全部详情页链接 """ all_list = [] res = requests.get(url, headers=headers) html = res.text pattern = re.compile('