#for your eyes only import requests url = 'www.facebook.com' response = requests.get(url) with open('textfile.txt', 'wb') as file: file.write(response.content)