favicon
Get a website's favicon.
What it is and what it does
favicon is a Python library that discovers and extracts favicon metadata from websites. It fetches a website's HTML, parses link and meta tags to locate favicon references, and returns a list of Icon objects containing the URL, dimensions, and format of each icon found. The library wraps requests and beautifulsoup4 to handle the HTTP fetching and HTML parsing.
You use it by calling favicon.get() with a URL, optionally passing request parameters like headers or timeout. The function returns Icon objects you can iterate over or filter by size. It's designed for scenarios where you need to programmatically retrieve favicon URLs for display, caching, or analysis—for example, building a bookmark manager, website metadata aggregator, or favicon cache.
Use it for:
- Bulk-download favicons for a list of URLs to build a local icon cache for a web application
- Extract favicon URLs from bookmarks or website directories for display in a custom browser or dashboard
- Analyze favicon metadata (dimensions, format) to identify high-resolution icons for archival or comparison
- Populate website metadata in a content aggregator or link-sharing tool with visual branding
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Fetches and parses a website's favicon from its HTML, returning icon metadata including URL, dimensions, and format.
Yes, if you need favicon extraction and can tolerate dormant maintenance. The library is stable and has no known vulnerabilities, but it hasn't been updated since 2019—verify that its favicon discovery logic still covers your target websites. Low install friction and permissive licensing make it a low-risk addition.
Install
favicon on PyPI
pip
pip install faviconuv
uv add faviconpoetry
poetry add faviconInstalling favicon
Before you install
Low install friction with two common dependencies (requests and beautifulsoup4). Maintenance is dormant—last release was 2019-08-31, though the repository remains unarchived.
License in practice
MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions.
Quickstart
pip install favicon
import favicon
icons = favicon.get('https://www.python.org/')
for icon in icons:
print(icon.url, icon.width, icon.height, icon.format)
Verify before relying
- Whether the package handles modern favicon discovery methods (e.g., webmanifest.json, SVG favicons) added after 2019
- Current compatibility with recent versions of beautifulsoup4 and requests, given the dormant maintenance status
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — requests, beautifulsoup4 |
| Maintenance | dormant — 2,540 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 406,639/month — #6,895 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: favicon-0.7.0-py2.py3-none-any.whl
Keywords: favicon, icon
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
sphinx-faviconA Sphinx extension that injects custom favicon…
permissive · top 15,000 on PyPI
linkpreviewExtracts preview metadata (title, description,…
permissive · top 15,000 on PyPI
Flask-SilkProvides a Flask integration to serve Silk icon…
permissive · top 15,000 on PyPI
beautifulsoup4Beautiful Soup parses HTML and XML documents…
permissive · top 100 on PyPI
fontawesomefreeDistributes Font Awesome Free icon fonts and…
unclear · top 15,000 on PyPI
imagesizeReads image file headers to extract dimensions,…
permissive · top 1,000 on PyPI
faiconsProvides Font Awesome 6.2.0 icons as SVG…
permissive · top 15,000 on PyPI
pyconifyPyconify wraps the Iconify API to search,…
permissive · top 15,000 on PyPI
streamlit-avatarRenders clickable avatar icons with images,…
unclear · top 15,000 on PyPI
latest-user-agentsFetches and provides current user agent strings…
permissive · top 15,000 on PyPI