Answers for "save 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
0

save a text file from web python

import urllib2response = urllib2.urlopen('https://wordpress.org/plugins/about/readme.txt')data = response.read()print(data)
Posted by: Guest on February-09-2021

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

Python Answers by Framework

Browse Popular Code Answers by Language