Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
import urllib
import urllib2
try:
import json
except ImportError:
try:
import simplejson as json
except ImportError:
raise ImportError("Need a json decoder")
// Call API to get a video oEmbed JSON response
var url = escape('http://vimeo.com/9503416');
var api_url = 'http://api.embed.ly/v1/api/oembed?url=' + url + '&callback=?';
//jQuery JSON call
$.getJSON( api_url, function(json) {
var html = json.html;
$('#videodiv').html(html);
});
# This is an implementation using python-oembed with api.embed.ly
# python-oembed http://code.google.com/p/python-oembed/
import oembed
# Embed.ly Multi Provider API Endpoint
OEMBED_ENDPOINT = 'http://api.embed.ly/oembed/api/v1'
# URL Schemes Supported --- complete list maintained
# http://api.embed.ly/static/data/embedly_regex.json
import embedly
oembed_json = embedly.get_oembed('http://www.youtube.com/watch?v=60og9gwKh1o')
print oembed_json.get('title')
print oembed_json.get('html')
{"provider_url": "http://vimeo.com/","title": "Digital Graffiti at the Olympic Village","html": "<object width="640" height="424"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=9503416&server=vimeo.com&show_title=1&show_byline=1&show_portrait=1&color=00ADEF&fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=9503416&server=vimeo.com&show_title=1&show_byline=1&show_portrait=1&color=00ADEF&fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="640" height="424"></embed></object>","author_name": "Alex Beim","height": "424","width": "640","version": "1.0","thumbnail_width": "200","provider_name": "Vimeo","thumbnail_url": "http://ats.vimeo.com/472/326/47232676_200.jpg","type": "video","thumbnail_height": "150","author_url": "http://vimeo.com/tangible",}
Category - info
Domain - http://slideshare.net
http://www.slideshare.net/doina/happy-easter-from-holland-slideshare
http://www.slideshare.net/stinson/easter-1284190
http://www.slideshare.net/angelspascual/easter-events
http://www.slideshare.net/sirrods/happy-easter-3626014
http://www.slideshare.net/sirrods/happy-easter-wide-screen
http://www.slideshare.net/carmen_serbanescu/easter-holiday
http://www.slideshare.net/Lithuaniabook/easter-1255880
import os
import re
import cgi
import datetime
import wsgiref.handlers
from django.utils import simplejson
from google.appengine.ext import db
from google.appengine.ext import webapp
from google.appengine.ext.webapp import template
//FROM http://ad1987.blogspot.com/2010/04/howto-create-facebook-status-message.html
function stripHTML(source){
var strippedText = source.replace(/<\/?[^>]+(>|$)/g, "");
return strippedText
}
function replaceURLWithHTMLLinks(source) {
var exp = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig;
return source.replace(exp,"<a href='$1' target='_blank'>$1</a>");
}
http://www.slideshare.net/doina/happy-easter-from-holland-slideshare
http://www.slideshare.net/stinson/easter-1284190
http://www.slideshare.net/angelspascual/easter-events
http://www.slideshare.net/sirrods/happy-easter-3626014
http://www.slideshare.net/sirrods/happy-easter-wide-screen
http://www.slideshare.net/carmen_serbanescu/easter-holiday
http://www.slideshare.net/Lithuaniabook/easter-1255880
http://www.slideshare.net/hues/easter-plants
http://www.slideshare.net/Gospelman/passover-week
http://www.slideshare.net/angelspascual/easter-around-the-world-1327542
@embedly
embedly / simple_twitter_search.html
Created May 3, 2010 17:19
Simple example of Twitter Search with Embedly
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head><script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="http://scripts.embed.ly/jquery.embedly.js"></script></head>
<body>
<form action="" method="get"><input type="text" name="q"/><input type="submit" name="q" value="Search"/></form>
<ul></ul>
<script>
function searchTwitter(q){
//Force twitter to only search image providers