Files
Gists/pin_fetcher.py/pins_from_cache.js
2023-06-19 09:38:01 -04:00

24 lines
895 B
JavaScript

/**
* Script taken and very slightly modified from here:
* https://32hertz.blogspot.com/2015/06/how-to-download-all-pictures-from.html
*
* Open the Firefox cache screen (about:cache, then click on list cache entries on the Disk section),
* then run this script on the Firefox console to get all links for Pinterest images that you have seen.
* Copy all the links in a .txt file and you can use img_spider.py to download them all.
**/
var a = document.getElementsByTagName("a");
var img;
var i = -1;
var body = document.getElementsByTagName("body");
var div = document.createElement("div");
var jpglink='';
while(++i<a.length){
if(a[i].toString().indexOf("236x")>0){
jpglink = document.createTextNode(a[i].innerHTML.replace("236x","originals"));
div.appendChild(jpglink);
div.appendChild(document.createElement("br"));
}
}
body[0].insertBefore(div,body[0].childNodes[0]);