coleifer

micawber: Extract Rich Content from URLs

micawber is a Python library for retrieving rich metadata from URLs and replacing links in text or HTML with embedded content. Use it when an application needs to turn supported links, such as video URLs, into rich previews.

Stars
679
Forks
90
Stars, last 18 days
-1

Our take

Health score

48/100

How it is scored
Activity
41
Community
42
Issues
46
Pull requests
62

-1 stars in the last 18 days

Overview

micawber helps Python applications turn URLs into rich metadata and embedded content. It is useful when plain links in text or HTML should become previews, such as embedded video players, without building provider-specific handling into the application.

It includes basic provider rules and supports requesting metadata, parsing text, and parsing HTML. The repository and documentation provide further details.

Key Features

  • Retrieve rich metadata for supported URLs.
  • Load basic provider rules with bootstrap_basic().
  • Request provider data and pass options such as a maximum embed width.
  • Replace recognized links in blocks of text with embedded content.
  • Parse HTML and replace recognized links while retaining the surrounding markup.
  • Return provider metadata such as titles, dimensions, thumbnails, and embed HTML when available.

Use Cases

  • A blog or publishing platform can turn pasted video links into embedded players.
  • A forum or community application can enrich links in user-submitted text.
  • A content-management tool can generate previews from supported URLs.
  • A Python application can retrieve provider metadata when it needs to display link details.

Getting Started

Review the README and documentation for setup and usage details. The README demonstrates initializing basic providers with micawber.bootstrap_basic().

Considerations

  • Rich results depend on the URL being recognized by a configured provider and that provider returning metadata.
  • The README's examples use YouTube; available providers and their behavior may vary.
  • The input does not specify installation requirements or a supported Python version, so check the project documentation before integrating it.

Found this useful?

Share it with someone who would like micawber.

Comparisons