faviconer is easy for get favicon package
Project description
[![CircleCI](https://circleci.com/gh/kuniiskywalker/faviconer.svg?style=svg)](https://circleci.com/gh/kuniiskywalker/faviconer)
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
When the favicon url is specified in the meta tag
>>> import faviconer
>>> faviconer.get_by_url("https://example.com/test/?aaa=1")
'https://example.com/image/icon.png'
When there is no specific URL specified in the meta tag
>>> import faviconer
>>> faviconer.get_by_url("https://example.com/test/?aaa=1")
'https://example.com/favicon.ico'
Get favicon.ico by url:
>>> import faviconer
>>> faviconer.get_by_url("https://example.com/")
'https://example.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
Built Distribution
File details
Details for the file faviconer-0.1.5.tar.gz
.
File metadata
- Download URL: faviconer-0.1.5.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.23.4 CPython/3.6.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1149f0ee5b0b16727ab0cca35156ff5caece1322633f71c2ef518aacca1667ea |
|
MD5 | 3dbb83d21617f884560110a732598e1d |
|
BLAKE2b-256 | 28c268281fcb1e78f6a966b6d84411ff0bded2b0280117578ec37797592645c0 |
File details
Details for the file faviconer-0.1.5-py3-none-any.whl
.
File metadata
- Download URL: faviconer-0.1.5-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.23.4 CPython/3.6.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4bf00e96fcce98482c472cb2388fa940412c8fe392994395396aac69197bc596 |
|
MD5 | 00006396fa25e7b834b2ef59d777fa6c |
|
BLAKE2b-256 | d9164ed5d81e7cd41881fb62848b8edf83452c41b71bd009a849b8763b247e40 |