Skip to main content

A Python library for scraping the Google search engine.

Project description

googlesearch

googlesearch is a Python library for searching Google, easily. googlesearch uses requests and BeautifulSoup4 to scrape Google.

Installation

To install, run the following command:

python3 -m pip install googlesearch-python

usage

To get results for a search term, simply use the search function in googlesearch. For example, to get results for "Google" in Google, just run the following program:

from googlesearch import search
search("Google")

Additional options

googlesearch supports a few additional options. By default, googlesearch returns 10 results. This can be changed. To get a 100 results on Google for example, run the following program.

from googlesearch import search
search("Google", num_results=100)

You can change the language google searches in. For example, to get results in French run the following program:

from googlesearch import search
search("Google", lang="fr")

Also, you can specify the date range of search: from which date and to which date you want your returned results be published (or only one of this borders):

from googlesearch import search
search("Google", date_to='1/1/2018', date_from='1/1/2019')

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

googlesearch-python-extended-2020.0.2.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file googlesearch-python-extended-2020.0.2.tar.gz.

File metadata

  • Download URL: googlesearch-python-extended-2020.0.2.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.5.0.1 requests/2.25.1 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.4

File hashes

Hashes for googlesearch-python-extended-2020.0.2.tar.gz
Algorithm Hash digest
SHA256 4fd0859464d821e573026fe47d0d415d4a03a758df41fb04230aea8a236623c2
MD5 1b156d8b76f4a17bda2fd8bbd5f38ab2
BLAKE2b-256 dc45c53e4ad4dba4b522b53f34edabcbd1900d50591c4f513ab4e57ffb0405fe

See more details on using hashes here.

File details

Details for the file googlesearch_python_extended-2020.0.2-py3-none-any.whl.

File metadata

  • Download URL: googlesearch_python_extended-2020.0.2-py3-none-any.whl
  • Upload date:
  • Size: 2.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.5.0.1 requests/2.25.1 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.4

File hashes

Hashes for googlesearch_python_extended-2020.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e5e5b63aae29e415bc0aa28b10a7f71f40cf7ff8a6e3b5f642c5c6009e92064e
MD5 26f8b60364acd138ead5afa1b3ffed3d
BLAKE2b-256 34cd84d034ab3d9907e8c7bb4cabcc1ff8228e96491900f2435a7db1df26cf61

See more details on using hashes here.

Supported by

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