Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Generate responsive, embeddable HTML/JS code from URL of online content

Project Description


Generate embeddable HTML or JavaScript code for a online content from its URL in a single step.

The content can be anything like

  • Yotube video
  • Twitter status
  • Flickr image etc.

Embeddable code-generation be simple like this:

>>> from embed_x import OnlineContent
>>> oc = OnlineContent('')
>>> oc.get_embed_code()
"<div class='embedx-yt'><iframe src='' 'frameborder='0' allowfullscreen></iframe></div>"

Currently, supports

  • Youtube video,
  • Vimeo video,
  • Twitter: single status,
  • Github gist,
  • Flickr image

from PyPI

pip install embedx

Directly from source

pip install git+


>>> from embedx import OnlineContent
>>> oc = OnlineContent('')
>>> oc.extract_id()

>>> oc.get_embed_code()
"<div class='embed-container'><iframe src='' 'frameborder='0'allowfullscreen></iframe></div>"

>>> oc = OnlineContent('')
>>> oc.get_embed_code()
"<div class='embed-container'> <iframe src='' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></div>"


  • Create test cases for automated testing
  • Provision Travis-CI for automatic building & testing
  • Add support for conda-based installation
  • Add more rich-content sites
    • Facebook status
    • Facebook notes
    • Scribd docs
    • Imgur images


Please try to contribute by submitting more content-sites with their different link formats and embed-codes. You can submit through pull-requests or by creating issue.

Release History

History Node


History Node


This version
History Node


History Node


History Node


Download Files

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

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(6.0 kB) Copy SHA256 Hash SHA256
Source None Jan 24, 2016

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers DreamHost DreamHost Log Hosting