Skip to content

Instantly share code, notes, and snippets.

@none53
Forked from aranajhonny/google-search-images.js
Created February 26, 2019 19:20
Show Gist options
  • Select an option

  • Save none53/4f05cd19f0de478c1a2dce3cbdd3acb4 to your computer and use it in GitHub Desktop.

Select an option

Save none53/4f05cd19f0de478c1a2dce3cbdd3acb4 to your computer and use it in GitHub Desktop.
google search images for deep learning
// pull down jquery into the JavaScript console
var script = document.createElement('script');
script.src = "https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js";
document.getElementsByTagName('head')[0].appendChild(script);
var urls = $('.rg_di .rg_meta').map(function() { return JSON.parse($(this).text()).ou; });
var textToSave = urls.toArray().join('\n');
var hiddenElement = document.createElement('a');
hiddenElement.href = 'data:attachment/text,' + encodeURI(textToSave);
hiddenElement.target = '_blank';
hiddenElement.download = 'urls.txt';
hiddenElement.click();
// and run
// wget -i urls.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment