Python library to get google search results.
Project description
pygsearch
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
Release history Release notifications | RSS feed
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.5.1.tar.gz
(4.3 kB
view details)
Built Distribution
File details
Details for the file pygsearch-0.5.1.tar.gz
.
File metadata
- Download URL: pygsearch-0.5.1.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba37ff3d49ba54f6b00a749073cedc767e41f2f25776a1982b78b38e0eb0d255 |
|
MD5 | 4c107942e03b56bc1ae39b92ce92ba12 |
|
BLAKE2b-256 | 13074ab5633422f1e311542d5c70bf2d43cbe613f752300ff7dfa993f204e951 |
File details
Details for the file pygsearch-0.5.1-py3-none-any.whl
.
File metadata
- Download URL: pygsearch-0.5.1-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94a6c9acdf8606c6b81187a76eef142d010f299eda4baf49a1a7bf71ab5d1ba1 |
|
MD5 | bb9a9ce72bff629f6e8a33ae0158693a |
|
BLAKE2b-256 | b462c0d651f87fa2c88ef583403f70b37201ac07241f02f56b60edbb3ff1df3d |