1import requests
2
3
4url = 'https://www.facebook.com/favicon.ico'
5r = requests.get(url, allow_redirects=True)
6
7open('facebook.ico', 'wb').write(r.content)
8
9#####################output################
10the file facebook.ico was created in the python folder