Google-Image-Scraper
About
This module is based on web-scraping technology and uses Google Images to provide a Streamable Image API.
Supported Browsers
How to Use?
from gi_scraper import Scraper
"""
from gi_scraper import Cache
cache = Cache(dir_path="gi_cache", timeout=-1)
sc = Scraper(workers=8, headless=False, cache=cache)
"""
sc = Scraper(headless=False)
for query, count in {"Naruto": 20, "Gintoki": 30}.items():
print("Scraping...", query, ":", count)
stream = sc.scrape(query, count)
for index, response in enumerate(stream.get()):
if index == 10:
sc.terminate_query()
break
print(response.width, "x", response.height, ":", response.image)
sc.terminate()