Git Product home page Git Product logo

embeddit's Introduction

Embeddit

A simple oembed meta fetcher which falls back to open graph info when oembed is not available.

Ask for oEmbed or Open Graph meta info about a url:

> oe = Embeddit('http://vimeo.com/33211636')

Get back a dictionary of that info:

> oe
{
    u'count': u'22906',
    u'description': u'During 3 years (2008-2011) i have been drawing 12 drawing of animation every day, it make one second of film. I had no plans what so ever before starting the first drawing. And then, each of the folowing days, I took the 3 last drawing from the day before...',
    u'image': u'http://b.vimeocdn.com/ts/225/276/225276903_640.jpg',
    u'site_name': u'Vimeo',
    u'source_type': 'open_graph',
    u'title': u'12 Drawings a Day - 12 Dessins par Jour',
    u'type': u'article',
    u'url': u'http://vimeo.com/33211636',
    u'video': u'http://vimeo.com/moogaloop.swf?clip_id=33211636',
    u'video:height': u'360',
    u'video:type': u'application/x-shockwave-flash',
    u'video:width': u'640'
}

Also returns json:

> oe.to_json()
'{
    "count": "22906",
    "site_name": "Vimeo",
    "description": "During 3 years (2008-2011) i have been drawing 12 drawing of animation every day, it make one second of film. I had no plans what so ever before starting the first drawing. And then, each of the folowing days, I took the 3 last drawing from the day before...",
    "title": "12 Drawings a Day - 12 Dessins par Jour",
    "url": "http://vimeo.com/33211636",
    "image": "http://b.vimeocdn.com/ts/225/276/225276903_640.jpg",
    "video:type": "application/x-shockwave-flash",
    "video:height": "360",
    "source_type": "open_graph",
    "video": "http://vimeo.com/moogaloop.swf?clip_id=33211636",
    "video:width": "640",
    "type": "article"
}'

Included data/providers.json is from:

http://oembed.com/providers.json

Last updated: June 28, 2016

embeddit's People

Contributors

rnagle avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.