https://www.mhtxs.la/27/27122/9059515.html,
这个是小说的网址,以下是代码:
import requests
url = 'https://www.mhtxs.la/27/27122/9059515.html'
headers = {
'referer': 'https://wap.mhtxs.la/',
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36',
'Cookie': 'Hm_lvt_9ccfa9d37cf68e93d4f0c6b7218d9c0c=1670303030; Hm_lvt_0d5483d71014269f1f02781138d29c4c=1670298247,1670303820; Hm_lpvt_0d5483d71014269f1f02781138d29c4c=1670303820'
}
response = requests.get(url=url,headers=headers)
response.encoding = 'utf-8'
print(response.text)
内容比网页源代码少了很多,小说的内容没有,问一下应该怎么弄谢谢
有东西,内容也与网页的一样