Skip to main content

Fetch & Download Images From Google

Project description

google_image_fetcher

Google Image Fetcher is a Python library that allows you to fetch images from Google Search using the Custom Search JSON API.

Motive Of The Project

Frontend Developers faces a problem , when they develop any website , that is IMAGE . All the time , they have to go to Google , to search and download the images , they want to use this in their website , when there is no Graphic Designer available in their team . As a Frontend Developer , I also faces the same problem . To solve this problem here you have this Python Library .

I want to develop this library for non-python programmers also . Here You can use this library , without any knowledge of Python Programming .

Here after following all the steps , you will be able to use the images , which will be downloaded according to your prompt / query . Also you can see the URL of those images in the terminal below .

Structure Of The Project

google_image_fetcher/

│

├── google_image_fetcher/

│   ├── __init__.py

│   └── google_image_fetcher.py

│

├── CONTRIUTING.md

├── LEARN.md

├── LICENSE

├── README.md

└── setup.py

setup.py

from setuptools import setup, find_packages

import codecs

import os



here = os.path.abspath(os.path.dirname(__file__))



with codecs.open(os.path.join(here, "README.md"), encoding="utf-8") as fh:

    long_description = "\n" + fh.read()



VERSION = '1.1.0'

DESCRIPTION = 'Fetch & Download Images From Google'

LONG_DESCRIPTION = 'Google Image Fetcher is a Python library that allows you to fetch images from Google Search using the Custom Search JSON API.'



# Setting up

setup(

    name="google_image_fetcher",

    version=VERSION,

    author="PB2204 (Pabitra Banerjee)",

    author_email="<rockstarpabitra2204@gmail.com>",

    description=DESCRIPTION,

    long_description_content_type="text/markdown",

    long_description=long_description,

    packages=find_packages(),

    install_requires=['requests'],

    keywords=['python', 'image', 'fetch', 'web scrapping', 'image scrapping'],

    classifiers=[

        "Development Status :: 1 - Planning",

        "Intended Audience :: Developers",

        "Programming Language :: Python :: 3",

        "Operating System :: Unix",

        "Operating System :: MacOS :: MacOS X",

        "Operating System :: Microsoft :: Windows",

    ]

)

Installation

You can install this library using pip:

pip install google_image_fetcher

or

pip install google-image-fetcher

Then You've to create new python (.py) file in the same folder , you're working in the Frontend / Full-Stack project .

Then You've to copy the following lines of code to your .py file .

from google_image_fetcher.google_image_fetcher import GoogleImageFetcher



# Create a GoogleImageFetcher instance

fetcher = GoogleImageFetcher()



# Define the search query

query = "YOUR_QUERY"



# Fetch and save images

fetcher.fetch_images(query, save_folder="YOUR_FOLDER NAME")

You just need to substitute YOUR_QUERY to your required Image Name and the YOUR_FOLDER NAME to , where you want to download the images , which will be created inside the same folder, where you're currently working . This is so simple to use .

Now you're ready to use the images .

Contribution

If you want to contribute something please follow the CONTRIUTING.md.

Happy Coding 🚀

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

google_image_fetcher-2.0.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

google_image_fetcher-2.0.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file google_image_fetcher-2.0.0.tar.gz.

File metadata

  • Download URL: google_image_fetcher-2.0.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for google_image_fetcher-2.0.0.tar.gz
Algorithm Hash digest
SHA256 29f4b674c81b27d95aa4a1795ccd430d94dd4c06e166254f632d200d0d7195ca
MD5 cba4cdb460a6f4ba6a2c43b1ec2426a5
BLAKE2b-256 2e08dbd22cf5b60f452377276933e0bee9823593077dfbddc590998a476d2e37

See more details on using hashes here.

File details

Details for the file google_image_fetcher-2.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for google_image_fetcher-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6b36df09b2d645fa25d0c0acbeafdb4aba6975b66327d3b637b52836562d600e
MD5 036405e993dcb2339266bb6531ee6820
BLAKE2b-256 90b3b5e0df77f5626628609be452c0ddf55a0c6e04ad7ab297a768627fbba457

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page