Answers for "write page source to text file python"

0

write page source to text file python

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)
Posted by: Guest on February-17-2021

Code answers related to "write page source to text file python"

Python Answers by Framework

Browse Popular Code Answers by Language