Download_google_image

I found a very useful API in fast.ai.widgets.

Actully, I found it after I failed in downloading in Chrome using the method given in the Part1, lesson 2. Nevertheless, I finally solved the poblem using the code below:

    var urls=Array.from(document.querySelectorAll('.rg_i')).map(el=> el.hasAttribute('data-src')?el.getAttribute('data-src'):el.getAttribute('data-iurl'));
    var hiddenElement = document.createElement('a');
    hiddenElement.href = 'data:text/csv;charset=utf-8,' + encodeURI(urls.join('\n'));
    hiddenElement.target = '_blank';
    hiddenElement.download = 'myFile.csv';
    hiddenElement.click();

This works well for me.

However, I think the download_google_image() function may perform better. But something went wrong with my HTTPS connection. :roll_eyes:

Hi Steven,

Could you please show me how to use “download_goole_images” to download teddy bear as an example?
I’m pretty confused about how to use this after reading the doc.

Thanks a lot!