Skip to content

Instantly share code, notes, and snippets.

@tpatel
Last active December 19, 2015 02:38
Show Gist options
  • Select an option

  • Save tpatel/5883936 to your computer and use it in GitHub Desktop.

Select an option

Save tpatel/5883936 to your computer and use it in GitHub Desktop.
Get the list of image urls from a photo page on Facebook.
var a=document.getElementsByClassName('uiMediaThumb'); //get all the photo thumbnails
var s='';
for(var i=0; i<a.length; i++) {
var re = /.*src=(.*.jpg).*/.exec(a[i]); //Extract the url of the full size image
var url = decodeURIComponent(re[1]);
s += url + '\n';
}
console.log(s); //display the list of image url
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment