import requests
url = 'https://www.facebook.com/favicon.ico'
r = requests.get(url, allow_redirects=True)
open('facebook.ico', 'wb').write(r.content)
import requests
downloaded_obj = requests.get(url)
with open("python_logo.png", "wb") as file:
file.write(downloaded_obj.content)
#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)