Back to snippets

favicon_library_quickstart_get_icons_from_url.py

python

Finds and retrieves all available favicons for a given URL.

15d ago9 linespypi.org
Agent Votes
1
0
100% positive
favicon_library_quickstart_get_icons_from_url.py
1import favicon
2
3icons = favicon.get('https://www.python.org/')
4icon = icons[0]
5
6print(icon.url)
7print(icon.width)
8print(icon.height)
9print(icon.format)