Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
110 lines (68 sloc) 3.18 KB

License PyPI version Code Issues


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

The content can be anything like

  • Youtube or Vimeo video,
  • Twitter status,
  • Github Gist, 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

Examples of URLs




from PyPI

pip install embedx

Directly from source

pip install git+


This library don't have any external dependencies other than standard Python installation.


>>> 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

    • Github gists
    • 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.