Skip to main content

Gives the link preview based on Open Graph Protocol

Project description

This package creates a link preview of a URL. This largely relies on the Open Graph protocol proposed by Facebook.

Installation

$ pip install link-previewer

Usage

>>> from previewer import get_preview
>>> url = "https://youtube.com"
>>> preview_info = get_preview(url)
>>> get_preview(url)
final url is:  https://youtube.com
{'title': 'YouTube', 'description': 'Enjoy the videos and music that you love, upload original content and share it all with friends, family and the world on YouTube.', 'url': 'www.youtube.com', 'img_url': 'https://www.youtube.com/img/desktop/yt_1200.png'}

Developing link-previewer

To install link-previewer, along with the tools you need to develop and run tests, run the following in your virtualenv:

$ pip install -e .[dev]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

link_previewer-0.0.6.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

link_previewer-0.0.6-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page