图片网址:/ | konachan.net - Konachan.com Anime Wallpapers
import requests
import re
import os
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36 Edg/92.0.902.67"
}
message = input('enter the name of your wife!')
pages = input("How many pages?")
if not os.path.exists(f'./{message}Libs'):
os.mkdir(f'./{message}Libs')
for page in range(1,int(pages)+1):
para = {
'page': page,
'tags': message,
}
url = f'https://konachan.net/post?page={page}&tags={message}'
page_text = requests.get(url = url, headers= headers).text
ex ='<a class="directlink largeimg" href="(.*?)">'
img_scr_list = re.find