Skip to content

Instantly share code, notes, and snippets.

@jvcleave
Forked from chrisallick/gist:4693962
Created March 25, 2013 21:34
Show Gist options
  • Save jvcleave/5241010 to your computer and use it in GitHub Desktop.
Save jvcleave/5241010 to your computer and use it in GitHub Desktop.
result.entities.urls[0].expanded_urlfetch = function(query) {
var script_tag = document.createElement("script");
script_tag.id = "fetcher";
script_tag.src = "https://search.twitter.com/search.json"+query+"&callback=parse";
document.body.appendChild(script_tag);
}
parse = function(data) {
document.body.removeChild(document.getElementById("fetcher"));
if( data && data.results ) {
for( var i = 0, len = data.results.length; i < len; i++ ) {
var result = data.results[i];
if( result.entities.urls[0].display_url ) {
if( result.entities.urls[0].expanded_url.indexOf("http://vine.co/v/") != -1 ) {
console.log( result.entities.urls[0].expanded_url );
vine_urls.push( result.entities.urls[0].expanded_url );
}
}
}
}
}
var vine_urls = new Array();
$(document).ready(function() {
fetch("?q=vine.co%2Fv%2F&result_type=recent&include_entities=1&rpp=20");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment