import requests
import re
main_url = 'https://www.qb5.tw/book_116663/'
main_html = requests.get(main_url).text
info_list = re.findall('(.*?)</dd' , main_html)
for inf in info_list:
url = 'https://www.qb5.tw/book_116663/'+inf[0]
response = requests.get(url)
html_date = response.text
text = re.findall('(.*?)', html_date)[0]
text = text.replace(' 全本小说 www.qb5.tw,最快更新<a,href="https://www.qb5.tw/book_116663/50916243.html>星门</a>最新章节!<br><br>'</span>, <span class="hljs-string">'')
text = text.replace(' ', ' ')
text = inf[1]+'\n\n'+text.replace('
', '\n')
print(text)
open('星门.txt', mode='a', encoding='gbk').write(text)
帮我试试看看这段代码什么问题,为什么得不到我想要的东西呀