Skip to main content

Preview Link

You may have seen a preview of a link with a title, image, domain, and description when you share a link on social media. This preview has a significant impact on the user's decision to click on or not click on that link.

previewlink will help you to get the preview of a link.

How it works?

previewlink looks for the following tags in the page source

Installation

Run the following to install

pip install previewlink

Usage

>>> from previewlink import preview_link
>>> # Generate link preview
>>> preview_link("https://github.com/sreehari1997")
{
    'title': 'sreehari1997 - Overview',
    'description': 'Developer. sreehari1997 has 69 repositories available. Follow their code on GitHub.',
    'domain': 'github.com',
    'image': 'https://avatars.githubusercontent.com/u/22663556?v=4?s=400'
}

Developing previewlink

To install previewlink, along with the tools you need to develop and run tests, run the following in your virtual env

$ pip install -e .[dev]

Metadata

Release files for previewlink 0.0.1

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

Source distribution (sdist)

Source distribution for previewlink 0.0.1
File Size Uploaded
previewlink-0.0.1.tar.gz 6.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for previewlink 0.0.1
File Interpreter ABI Platform
previewlink-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 11.6 kB

Release history Release notifications | RSS feed

This release

0.0.1 This release

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