Last active
December 19, 2015 02:38
-
-
Save tpatel/5883936 to your computer and use it in GitHub Desktop.
Get the list of image urls from a photo page on Facebook.
This file contains hidden or 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
| 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