Skip to content

atbuy/pygsearch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

Python library to view google search results

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages