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

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

Project Description

embedX

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('http://www.youtube.com/embed/_lOT2p_FCvA')
>>> oc.get_embed_code()
"<div class='embedx-yt'><iframe src='http://www.youtube.com/embed/_lOT2p_FCvA' '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+https://github.com/kmonsoor/embedX.git

Usage

>>> from embedx import OnlineContent
>>> oc = OnlineContent('http://www.youtube.com/embed/_lOT2p_FCvA')
>>> oc.extract_id()
'_lOT2p_FCvA'

>>> oc.get_embed_code()
"<div class='embed-container'><iframe src='http://www.youtube.com/embed/_lOT2p_FCvA' 'frameborder='0'allowfullscreen></iframe></div>"

>>> oc = OnlineContent('https://vimeo.com/groups/animation/videos/150618894/')
>>> oc.get_embed_code()
"<div class='embed-container'> <iframe src='http://player.vimeo.com/video/150618894' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></div>"

To-do

  • 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

Contributors

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

Release History

History Node

0.0.7

This version
History Node

0.0.6

History Node

0.0.5

History Node

0.0.4

History Node

0.0.3

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
embedx-0.0.6-py2.py3-none-any.whl (8.1 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Feb 6, 2016

Supported By

WebFaction WebFaction Technical Writing 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 Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting