Created
November 16, 2011 02:59
-
-
Save tcaddy/1369131 to your computer and use it in GitHub Desktop.
Google+ private photo album getter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// visit a the pictures uploaded from cell phone page | |
// instant upload images are here: https://plus.google.com/u/0/photos/fromphone | |
// open javascript console... | |
// add jQuery to page | |
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.async=1; g.src="//ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"; s.parentNode.insertBefore(g,s)}(document,"script")); | |
// create an array of objects, where the `url` property is the full size original uploaded image | |
var a=[];jQuery.each(jQuery("img.B-J-pc-ja[src$='.jpg'],img.B-J-pc-ja[src$='.JPG']"), function(i,item){var h={src:jQuery(this).attr('src')};h.proto=h.src.split('://')[0];h.host=h.src.split('://')[1].split('/')[0];h.pieces=h.src.split('://')[1].split('/');var url=[];for(var i=1;i<h.pieces.length;i++){if(i==(h.pieces.length-2)){url.push('s0-d');}else{url.push(h.pieces[i]);}};h.url=h.proto+'://'+h.host+'/'+url.join('/');a.push(h); });a; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment