Skip to content

Instantly share code, notes, and snippets.

'http://www.flickr.com/photos/cksample3/4383370998/'
'http://soundcloud.com/decksharks-records/tomaz-del-corazon-charter-service'
'http://soundcloud.com/krizz-luco/klanggefluster-01'
'http://www.youtube.com/watch?v=nlh5pECfpug'
'http://tweetphoto.com/31205172'
'http://yfrog.com/jceclipse8j'
'http://tweetphoto.com/31223684'
'http://www.ustream.tv/channel/dj-wally'
'http://tweetphoto.com/31091156'
'http://yfrog.com/me1066510j'
#!/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")
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Recent Tweets</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link rel="stylesheet" href="http://fanpagelist.com/css.css" />
<link rel="stylesheet" type="text/css" href="http://fanpagelist.com/jquery/jquery.css" />
// Call API to get a video oEmbed JSON response
var url = escape('http://vimeo.com/9503416');
var api_url = 'http://api.embed.ly/1/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 requests
import sys
for q in range(1,3):
for i in range(1,10000):
response = requests.post('http://apply.embed.ly/%s' % q, data={'answer': str(i)})
if response.status_code == 302:
print 'question: %, answer: %s' % (q, i)
sys.exit(0)
@artgibson
artgibson / objectify_images
Created June 5, 2012 14:22
images reference in response
"images": [
{
"url": "http://fgr.fashionisto.netdna-cdn.com/wp-content/uploads/2012/06/butterfly6.jpg",
"width": 760,
"height": 991,
"size": 130626
},
{
"url": "http://imagesgonerogue.com/preview/06/butterfly6.jpg",
"width": 760,
@artgibson
artgibson / gist:4205162
Created December 4, 2012 15:29
embedly w/ target=blank
<!DOCTYPE>
<html>
<head>
<title>Page Title</title>
<script src="http://code.jquery.com/jquery-1.4.4.min.js"></script>
<script src="http://scripts.embed.ly/jquery.embedly.min.js"></script>
<script type="text/javascript">
$('document').ready(function(){
var displayFunc = function(oembed, dict){
<!DOCTYPE>
<html>
<head>
<title>Page Title</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js" type="text/javascript"></script>
<script src="http://cdn.embed.ly/jquery.embedly-3.1.1.min.js" type="text/javascript"></script>
<script type="text/javascript">
$('document').ready(function(){
$('div.content').embedly({
query: { maxwidth: 450, wmode: 'transparent'},
{
"Embed": {
en : 'Embed',
es : 'Insertar',
tr : 'Embed',
de : 'Einbetten',
fr : 'Ins\u00E9rer'
},
"Share": {
de: "Teilen",