headers={'User_Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36 Edg/96.0.1054.53'}
response=requests.get('https://www.52bqg.net/110_110102/',headers=headers)
html_date=re.findall('
i=0
for book_url in html_date:
book_url='https://www.52bqg.net/110_110102/'+book_url+'.html'
# print(book_url)
book_response=requests.get(url=book_url,headers=headers)
# print(book_response.text)
boo_data=re.findall('
# print(book)
print(file_name+html_title[i]+'.txt') # 先确认你的文件名是否是你想要的名字
with open(file_name+html_title[i]+'.txt','w')as f:
f.write(book)
i=i+1
print(html_title)