Python:
import requests
a = True
while a:
url = "https://www.lolichan.vip/"
headers = {
'user-agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.122 Safari/537.36'
}
params = {
'_v': '5.12.0'
}
res = requests.get(url=url,params=params,headers=headers)
dict_object = res.text
with open("./lolichan.html","w",encoding='utf-8') as fp:
fp.write(dict_object)
print('over')
a = False
#pycharm中需要安装requests的包才能运行(python语言环境下)
附件
最后编辑: