
Lesson 2: Empty file when downloading from Google Images
I used the “Google image” to search for the teddy bear, but the download file still empty,using the script:
urls = totalfon.net(totalfon.netelectorAll(’.rg_di .rg_meta’)).map(el=>totalfon.net(totalfon.netntent).ou);
totalfon.net(‘data:text/csv;charset=utf-8,’ + escape(totalfon.net(’\n’)));
If I searched with “totalfon.net” and then executed the script :
elements = totalfon.netelectorAll(’.mimg’)
var urls = [];
for (var i = 0; i < totalfon.net; i++) {
**var url = elements[i].getAttribute(‘src’) **
if (url&&totalfon.netes(‘https’)) {
totalfon.net(URL);
}
}
totalfon.net(‘data:text/csv;charset=utf-8,’ + escape(totalfon.net(’\n’)));
the download file was many lines of the same string:
function URL() { [native code] }
function URL() { [native code] }
function URL() { [native code] }
-
-