Skip to main content

A command line tool for Google web and image search.

Project description

Install

  1. Install Python

  2. Install search_google via pip

pip install search_google

For the latest developer version, see Developer Install.

Usage

For usage details, refer to the documentation.

search_google -h
search_google cat
search_google cat --searchType=image
search_google cat --save_links=cat.txt

Developer Notes

Developer Install

Install the latest developer version from github:

pip install git+https://github.com/rrwen/search_google

Install from cloned source:

git clone https://github.com/rrwen/search_google
cd search_google
pip install . -I

Documentation Maintenance

  1. Ensure sphinx is installed pip install -U sphinx

  2. Generate the documentation in docs/

pip install . -I
sphinx-build -b html docs/source docs

Uploading to PyPi

  1. Ensure twine is installed pip install twine

  2. Delete dist directory

  3. Update the versions in setup.py and docs/source/conf.py

  4. Perform Documentation Maintenance

  5. Create source distribution

  6. Upload to PyPi

python setup.py sdist
twine upload dist/*

Implementation

This command line tool used the Google Custom Search Engine (CSE) to perform web and image searches. It relied on googleapiclient.build and cse.list, where build was used to create a Google API object and cse was used to perform the searches. The class search_google.cse simply passed a dictionary of arguments onto build and cse and manipulated the results using properties and methods. search_google.cli was then used to create a command line interface for search_google.cse. In order to use build and cse, a Google Developer API Key and a Google CSE ID must be created to have access (see search_google Setup). Creating these keys required a Gmail account for login access.

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

search_google-1.0.2.tar.gz (6.7 kB view hashes)

Uploaded Source

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