Skip to main content

A utility for dispatching to known oembed providers

Project description

oembedders

Build Status

oembedders is a small wrapper around python-oembed and the oembed provider registry to set up an oembed consumer that is configured with all known providers.

Install

pip install oembedders

Usage

from oembedders import embed

e = embed('https://www.youtube.com/watch?v=dQw4w9WgXcQ')

You can also use it from the command line:

oembedders https://www.youtube.com/watch?v=dQw4w9WgXcQ
{
  "author_url": "https://www.youtube.com/user/RickAstleyVEVO",
  "title": "Rick Astley - Never Gonna Give You Up (Video)",
  "thumbnail_width": 480,
  "html": "<iframe width=\"480\" height=\"270\" src=\"https://www.youtube.com/embed/dQw4w9WgXcQ?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>",
  "type": "video",
  "thumbnail_url": "https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg",
  "version": "1.0",
  "author_name": "RickAstleyVEVO",
  "provider_url": "https://www.youtube.com/",
  "width": 480,
  "provider_name": "YouTube",
  "thumbnail_height": 360,
  "height": 270
}

Providers

The provider registry data is maintained in iamcal/oembed. It can be updated at any time in oembedders with the supplied Makefile which will download the latest data and put it into place so it can be committed.

Project details


Download files

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

Source Distribution

oembedders-0.0.3.tar.gz (26.4 kB view details)

Uploaded Source

File details

Details for the file oembedders-0.0.3.tar.gz.

File metadata

  • Download URL: oembedders-0.0.3.tar.gz
  • Upload date:
  • Size: 26.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.0 CPython/3.7.3

File hashes

Hashes for oembedders-0.0.3.tar.gz
Algorithm Hash digest
SHA256 9d153b74ce41cbe93b3f584a7c88be571b6d557985218ec5d1f0502a83a835e3
MD5 b1d4bc04de6b46d7de5a976c201806a7
BLAKE2b-256 4c51221332a86fa779a55266fc1fdfcfc8da230e703e45145f62dfdff0e9a19e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page