📅  最后修改于: 2022-03-11 14:46:09.824000             🧑  作者: Mango
import requests
url = "https://stackoverflow.com/questions/24297257/save-html-of-some-website-in-a-txt-file-with-python"
r = requests.get(url)
with open('file.txt', 'w') as file:
file.write(r.text)