Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9782

in google photos how can I get a list of all my album names and URLs that I can paste into google sheets or excel

$
0
0

I have used the following script which brings back about 90 albums with URLs. BUT - I then have to page down a few and repeat and this brings back a few more. With 800 odd albums this takes a long while. Does any know how to get back all the albums at once?

Executed on the page https://photos.google.com/albums, this script returns a string that can be copy-pasted to a Google Sheet, creating a table of names and URLs.

var links = document.getElementsByTagName('A');var s = '';for (var i = 0; i < links.length; i++) {let link = links[i];if (/\b\d+ items\b/.test(link.innerText)) {let divs = link.getElementsByTagName('DIV');for (var j = 0; j < divs.length; j++) {let div = divs[j];let text = div.innerText;if (text != "" && div.childElementCount == 0 && ! /\b\d+ items\b/.test(text)) {s = s + text +'\t'+ link.href +'\n';break;}}}}s;


Viewing all articles
Browse latest Browse all 9782

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>