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>

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

micawber-0.8.0.tar.gz (38.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

micawber-0.8.0-py3-none-any.whl (41.1 kB view details)

Uploaded Python 3

File details

Details for the file micawber-0.8.0.tar.gz.

File metadata

  • Download URL: micawber-0.8.0.tar.gz
  • Upload date:
  • Size: 38.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for micawber-0.8.0.tar.gz
Algorithm Hash digest
SHA256 deedaa9117c56c7d80030ac5566fdc5b52b3eb6a9faf2baa69408896d9090d28
MD5 b2890080097e161de18c67a43ff80fac
BLAKE2b-256 92946c4e22f7337d0abdd092e0804fa189925dfca06911eab426f4654a2c67c1

See more details on using hashes here.

File details

Details for the file micawber-0.8.0-py3-none-any.whl.

File metadata

  • Download URL: micawber-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 41.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for micawber-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3acc181c2baa6c01c811bd4cdbbfcaf2b0ee3552d7ecd81613fe3f6b79412286
MD5 3225719a18535a1c1c2ea5e2f21823f6
BLAKE2b-256 516d390a1e44476b67e14478c1a3415210983ee57731ee2dd1561ee0a7325960

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.8.0 This release

2 files

0.7.1

2 files

0.7.0

2 files

0.6.2

2 files

0.6.1

2 files

0.6.0

2 files

0.5.6

1 file

0.5.5

1 file

0.5.4

1 file

0.5.3

1 file

0.5.2

1 file

0.5.1

1 file

0.5.0

1 file

0.4.1

1 file

0.4.0

1 file

0.3.8

1 file

0.3.7

1 file

0.3.6

1 file

0.3.5

1 file

0.3.4

1 file

0.3.3

1 file

0.3.2

1 file

0.3.1

1 file

0.3.0

1 file

0.2.6

1 file

0.2.5

1 file

0.2.4

1 file

0.2.3

1 file

0.2.2

1 file

0.2.1

1 file

0.2.0

1 file

0.1.0

1 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