Skip to content

Commit 0024dc7

Browse files
raphinkjph00
authored andcommitted
Fix URL grab method for new Google images DOM (fastai#450)
1 parent 35ea4d4 commit 0024dc7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nbs/dl1/lesson2-download.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
"You will need to get the urls of each of the images. Before running the following commands, you may want to disable ad blocking extensions (uBlock, AdBlockPlus etc.) in Chrome. Otherwise the window.open() command doesn't work. Then you can run the following commands:\n",
7979
"\n",
8080
"```javascript\n",
81-
"urls = Array.from(document.querySelectorAll('.rg_di .rg_meta')).map(el=>JSON.parse(el.textContent).ou);\n",
81+
"urls=Array.from(document.querySelectorAll('.rg_i')).map(el=> el.hasAttribute('data-src')?el.getAttribute('data-src'):el.getAttribute('data-iurl'));\n",
8282
"window.open('data:text/csv;charset=utf-8,' + escape(urls.join('\\n')));\n",
8383
"```"
8484
]

0 commit comments

Comments
 (0)