Skip to main content
http://media.charlesleifer.com/blog/photos/micawber-logo-0.png

A small library for extracting rich content from urls.

what does it do?

micawber supplies a few methods for retrieving rich metadata about a variety of links, such as links to youtube videos. micawber also provides functions for parsing blocks of text and html and replacing links to videos with rich embedded content.

examples

here is a quick example:

import micawber

# load up rules for some default providers, such as youtube and flickr
providers = micawber.bootstrap_basic()

providers.request('https://www.youtube.com/watch?v=54XHDUOHuzU', maxwidth=640)

# returns the following dictionary:
{
    'author_name': 'Pascal Brax',
    'author_url': 'https://www.youtube.com/@PascalBrax',
    'height': 480,
    'html': '<iframe width="640" height="480" src="https://www.youtube.com/embed/54XHDUOHuzU?feature=oembed" ...></iframe>',
    'provider_name': 'YouTube',
    'provider_url': 'https://www.youtube.com/',
    'thumbnail_height': 360,
    'thumbnail_url': 'https://i.ytimg.com/vi/54XHDUOHuzU/hqdefault.jpg',
    'thumbnail_width': 480,
    'title': 'Future Crew - Second Reality demo - HD',
    'type': 'video',
    'url': 'https://www.youtube.com/watch?v=54XHDUOHuzU',
    'version': '1.0',
    'width': 640,
}

providers.parse_text('this is a test:\nhttps://www.youtube.com/watch?v=54XHDUOHuzU')

# returns the following string:
this is a test:
<iframe width="200" height="150" src="https://www.youtube.com/embed/54XHDUOHuzU?feature=oembed" ...></iframe>

providers.parse_html('<p>https://www.youtube.com/watch?v=54XHDUOHuzU</p>')

# returns the following html:
<p><iframe width="200" height="150" src="https://www.youtube.com/embed/54XHDUOHuzU?feature=oembed" ...></iframe></p>

Release files for micawber 0.8.0

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

Source distribution (sdist)

Source distribution for micawber 0.8.0
File Size Uploaded
micawber-0.8.0.tar.gz 38.2 kB Details

Built distribution (wheel)

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

Total release size: 79.4 kB

Release files / micawber-0.8.0.tar.gz

Download URL micawber-0.8.0.tar.gz
Size 38.2 kB
Tags Source
SHA-256 checksum
How to use checksums
deedaa9117c56c7d80030ac5566fdc5b52b3eb6a9faf2baa69408896d9090d28
BLAKE2b-256 checksum
How to use checksums
92946c4e22f7337d0abdd092e0804fa189925dfca06911eab426f4654a2c67c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / micawber-0.8.0-py3-none-any.whl

Download URL micawber-0.8.0-py3-none-any.whl
Size 41.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3acc181c2baa6c01c811bd4cdbbfcaf2b0ee3552d7ecd81613fe3f6b79412286
BLAKE2b-256 checksum
How to use checksums
516d390a1e44476b67e14478c1a3415210983ee57731ee2dd1561ee0a7325960
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

0.8.0 This release

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.6

1 release file

0.5.5

1 release file

0.5.4

1 release file

0.5.3

1 release file

0.5.2

1 release file

0.5.1

1 release file

0.5.0

1 release file

0.4.1

1 release file

0.4.0

1 release file

0.3.8

1 release file

0.3.7

1 release file

0.3.6

1 release file

0.3.5

1 release file

0.3.4

1 release file

0.3.3

1 release file

0.3.2

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.6

1 release file

0.2.5

1 release file

0.2.4

1 release file

0.2.3

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.0

1 release file

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