Skip to content

A Python library designed to pull and process metadata very quickly to unfurl URL contents into a JSON object that can the be used by other programs for portraying that data, similar to how link expansion works in apps like Slack.

License

Notifications You must be signed in to change notification settings

tdarwin/rapidunfurl

Repository files navigation

RapidUnfurl

RapidUnfurl is a Python library designed to pull and process metadata very quickly to unfurl URL contents into a JSON object that can the be used by other programs for portraying that data, similar to how link expansion works in apps like Slack.

This library was originally forked from Loftie Ellis' pyunfurl library, which is an awesome project. I just wanted to do some things to speed up the process, and drop away the html rendering, which I didn't need.

Features

Installation

Use the package manager pip to install pyunfurl.

pip install rapidunfurl

Usage

import rapidunfurl
rapidunfurl.unfurl('https://davintaddeo.com') 

This will return a dict similar to the oembed spec:

{
  "type": "website",
  "url": "https://davintaddeo.com",
  "title": "Davin Taddeo | DevOps Advocate",
  "site_name": "@tdarwin",
  "description": "Homepage of Davin Taddeo, DevOps Advocate, Senior Customer Architect for Chef",
  "image": "https://davintaddeo.com/assets/images/round_headshot.png",
  "card": "summary",
  "favicon": "https://davintaddeo.com/favicon.ico"
}

Contributing

Pull requests are welcome. RapidUnfurl supports some custom integrations for sites that doesnt return any meta tags, if you want to improve the integration for a specific site you can look at the hackernews example.

License

MIT

About

A Python library designed to pull and process metadata very quickly to unfurl URL contents into a JSON object that can the be used by other programs for portraying that data, similar to how link expansion works in apps like Slack.

Resources

License

Stars

Watchers

Forks