Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

faviconer

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

faviconer

faviconer is easy for get favicon package

  • 0.1.5
  • PyPI
  • Socket score

Maintainers
1

================ faviconer

CircleCI

What is this?

This is a package to get a nice favicon from a website

Installation

.. code-block:: bash

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

.. code-block:: python

>>> 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

.. code-block:: python

>>> import faviconer
>>> faviconer.get_by_url("https://example.com/test/?aaa=1")
'https://example.com/favicon.ico'

Get favicon.ico by url:

.. code-block:: python

>>> 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

.. code-block:: python

>>> 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'

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc