faviconer is easy for get favicon package
Project description
What is this?
This is a package to get a nice favicon from a website
Installation
pip install faviconer
Usage
Get favicon.ico:
Get /favicon.ico if there is no explicit favicon url specified in the meta tag of the target site
>>> import faviconer
>>> faviconer.get("http://google.com/")
'http://google.com/favicon.ico'
Get favicon.ico by url:
Get /favicon.ico
>>> import faviconer
>>> faviconer.get_by_url("http://google.com/")
'http://google.com/favicon.ico'
Get favicon.ico by html:
Analyze the target site html and get favicon.ico if favicon url is specified in meta tag
>>> import faviconer
>>> faviconer.get_by_html('<html><head><link rel="shortcut icon" href="https://cdn.sstatic.net/Sites/stackoverflow/img/favicon.ico"></head><body></body</html>')
'https://cdn.sstatic.net/Sites/stackoverflow/img/favicon.ico'
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
faviconer-0.1.2.tar.gz
(2.1 kB
view hashes)
Built Distribution
Close
Hashes for faviconer-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9f08e18fb3fd1a51db546e45cc06fbc265142d232870266092b7760dd7032a1 |
|
MD5 | f5e659b01155e77c36f0c55205b414f8 |
|
BLAKE2b-256 | d7fe0fc2309c9eb396d67b683b9d496d80a7f60e4ae9953cd9dffdd663834d52 |