google-search
stable
  • google-search
    • Features
    • Credits
  • Installation
  • Usage
  • Contributing
google-search
  • Docs »
  • google-search
  • Edit on GitHub

google-search¶

https://img.shields.io/pypi/v/google-search.svg https://img.shields.io/travis/anthonyhseb/googlesearch.svg Documentation Status Updates

Library for scraping google search results.

  • Usage:

    from googlesearch.googlesearch import GoogleSearch
    response = GoogleSearch().search("something")
    for result in response.results:
        print("Title: " + result.title)
        print("Content: " + result.getText())
    
  • Free software: MIT license

Features¶

Run a Google search and fetch the individual results (full HTML and text contents). By default the result URLs are fetched eagerly when the search request is made with 10 parallel requests. Fetching can be deferred until searchResult.getText() or getMarkup() are called by passing prefetch_results = False to the search method.

Pass num_results to the search method to set the maximum number of results.

SearchReponse.total gives the total number of results on Google.

Credits¶

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

Next Previous

© Copyright 2017, Anthony Hseb Revision 06fc3dcd.

Built with Sphinx using a theme provided by Read the Docs.