Google Image Scraper.
Project description
Google-Image-Scraper
About
This module is based on web-scraping technology and uses Google Images to provide a Streamable Image API.
Supported Systems
- Windows
Supported Browsers
- Chrome
How to Use?
# import Scraper class
from gi_scraper import Scraper
# The object creation has an overhead time
# The same object can be reused to fire multiple queries
sc = Scraper(workers=4, headless=False)
stream = sc.get_stream()
for query, count in {"Naruto": 50, "Gintoki": 50}.items():
# 'get_stream' method returns a generator 'stream'
# The module expects 'stream' to be called immediately
# after a query is fired and doesn't allow
# chaining queries directly.
sc.scrape(query, count, timeout=5)
# A Response object is returned from the stream
# It that the following attributes:
# name - Image Name,
# position - Image Index in Google Images,
# sourceName - Source Website Name,
# sourcePage - Source WebPage,
# thumbnail - Image Thumbnail,
# url - Image URL
for response in stream():
# call 'to_dict' method for a python dictionary representation
print(response.to_dict())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gi_scraper-0.3.2.tar.gz
(3.7 kB
view hashes)
Built Distribution
Close
Hashes for gi_scraper-0.3.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 650930ac5ba876e1827bfa695c6650f60ab3a341b5dd50384598c34836351c44 |
|
MD5 | c8db9e56865e35ee006f12a03f4520cf |
|
BLAKE2b-256 | cf64a10614c01c133cd09f28229df8054cc683301a0c504d87eb681cd50ec959 |