Images not downloading?

Hi! In lecture 2, Jeremy downloads all of the photos in Google Images with this line of code:

urls = Array.from(document.querySelectorAll(’.rg_di .rg_meta’)).map(el=>JSON.parse(el.textContent).ou);
window.open(‘data:text/csv;charset=utf-8,’ + escape(urls.join(’\n’)));

I followed his exact instructions, but when I try to open the file that I downloaded, it’s empty. It also shows the file size is 0 KB. I’m not sure what I did wrong, any ideas?

Actually, I found the problem! I was copying and pasting the code from Hiromi’s notes, but when I tried the actual code from the notebook, it worked! I think there may be some differences between the codes?

1 Like