Skip to main content

Python library to get google search results

Project description

pygsearch

pypi version info python version support

pygsearch is a python library that let's you use google search. Right now you can't search for images. Image support might be added later. PRs are welcome.

Installing

Python 3.6.0 or higher is required

To install the library you can run the following command:

# Linux/MacOS
python3 -m pip install --upgrade pygsearch

# Windows
py -3 -m pip install --upgrade pygsearch

Quickstart

You can make a simple search query like this:

from pygsearch import gsearch

search = gsearch("github")
print(search.results)

Or you can iterate over the results:

from pygsearch import gsearch

results = gsearch("github")
for result in results:
    print(result)

You can also change how many results you want, pass your own headers, use proxies or even change the language:

from pygsearch import gsearch

proxies = {
    "http": "proxy_http",
    "https": "proxy_https",
    "ftp": "proxy_ftp"
}

headers = {
    "key1": "val1",
    "key2": "val2",
    "key3": "val3",
}

language = "en"
search = gsearch("github", 20, language, headers, proxies)
print(search.results)

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

pygsearch-0.6.0.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

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

pygsearch-0.6.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file pygsearch-0.6.0.tar.gz.

File metadata

  • Download URL: pygsearch-0.6.0.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.21

File hashes

Hashes for pygsearch-0.6.0.tar.gz
Algorithm Hash digest
SHA256 b13063fcdd78dbdb7ef37f89a2e8a26016fb77826028f687a8315b0e98325057
MD5 2e2cac5d461a98124ce1bf3edd1af10a
BLAKE2b-256 1fe227683e4a4421d03a622fa5e3b4e7290f9787da9d504c107d532e458423c4

See more details on using hashes here.

File details

Details for the file pygsearch-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: pygsearch-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.21

File hashes

Hashes for pygsearch-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c6173d9c6d4ae7574f5a3b3859f245043b0633bb04c2082e60761218157a217e
MD5 b32659550787f5913970a0822f704473
BLAKE2b-256 525c3005b20e1de5308accec33b5bbb1a453620df22f9593090e19499c6f8cf0

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