Created
February 6, 2020 16:45
-
-
Save innermond/08124bd00308d31da8a4e8ac73c0b337 to your computer and use it in GitHub Desktop.
get link to image of a google search result
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
| out='' | |
| src='' | |
| document.querySelectorAll('img[class^=rg_i]').forEach(x=>{ | |
| src=x.dataset.src??x.dataset.iurl??x.src??'none' | |
| if (src === 'none') { | |
| console.log(x) | |
| return | |
| } | |
| out+=src+"\n" | |
| }) | |
| console.log(out) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment