garyfeng / google-images-download

Python Script to download hundreds of images from 'Google Images'. It is a ready-to-run code!
MIT License
1 stars 0 forks source link

Add "online_chip" to the Google Image Search URL #1

Closed garyfeng closed 2 years ago

garyfeng commented 2 years ago

As of Dec 2021, the google image search allows you to refine your searches with UI chip elements -- prepared tags based on the images in the research results.

For example, if you search for "swimming" using the standard google image search on browser, you will see chip UI elements right under the search bar, suggesting "free style", "underwater", "female swimmer", etc. Clicking on one or more of those will refine your search results -- this is reflected in the search URL, e.g., for:

Notes:

garyfeng commented 2 years ago

To-do:

Additional thoughts:

garyfeng commented 2 years ago

Usage:

We then parse the string by , into an array, and insert &chips=q:KEYWORD,online_chip:keyword+one,online_chip:keyword+two,online_chip:keyword+three.

Note

&chips=q:swimming,g_1:underwater:QMBk9Fu0UUs%3D,g_1:pool:pcMtMsPoOMM%3D,online_chips:dolphin+kick:ECAdxtgRNu8%3D

garyfeng commented 2 years ago

tested googleimagesdownload -k "swimming free style" -oc "female swimmer" -l 5

closing