Skip to main content

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]

Release files for link-previewer 0.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for link-previewer 0.0.6
File Size Uploaded
link_previewer-0.0.6.tar.gz 4.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for link-previewer 0.0.6
File Interpreter ABI Platform
link_previewer-0.0.6-py3-none-any.whl Python 3 none any Details

Total release size: 8.9 kB

Release history Release notifications | RSS feed

This release

0.0.6 This release

2 release files

0.0.5

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page