A simple Python package for performing Google searches
Project description
📦 gsearchpy
gsearchpy is a lightweight Python package that allows you to perform Google Search queries programmatically and retrieve raw search result pages with ease.
It is built for developers, researchers, and automation enthusiasts who need a flexible interface to Google Search.
Table of Contents
🚀 Features
- 🔍 Perform Google searches using customizable parameters
- 📄 Retrieve raw HTML content and filtered data of Google search results
- 🔁 Built-in pagination support
📦 Installation
pip install gsearchpy
Using Github
pip install git+https://@github.com/itsguptaaman/gsearchpy.git
After Installation run this command to setup the drivers and dependency
gsearchpy
📦 Example Usage
For raw data response
from gsearchpy import GoogleScraper
scraper = GoogleScraper()
html = scraper.google_search(query)
For clean data
from gsearchpy import GoogleScraper
query = "best VSCode extensions for productivity"
scraper = GoogleScraper()
html = scraper.google_search(query)
print(scraper.google_search_clean_data(html))
To get google maps data or any other data use tbm paramter
from gsearchpy import GoogleScraper
google = GoogleScraper()
query = "coffee shop in dubai"
html = google.google_search(query, tbm="lcl")
print(google.local_search_clean_data(html))
Also you can use v2 except for google search you can use this for lcl, images, news, and etc.
from gsearchpy import GoogleScraper
google = GoogleScraper()
query = "coffee shop in dubai"
html = google.google_search_v2("plumbers", page_number=2, gl="ahemdabad")
print(google.local_search_clean_data(html))
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gsearchpy-0.1.5.tar.gz.
File metadata
- Download URL: gsearchpy-0.1.5.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
01f7520bcf73f5de7d483dca875f28339492c72beb332b5862ad029aeaba2b83
|
|
| MD5 |
de1c6006373458d2e04658550d792d1a
|
|
| BLAKE2b-256 |
0e8c8b631826924ca75a4dbd2f24180368d2690d1c1b1aba2b1e81eae69f9c15
|
File details
Details for the file gsearchpy-0.1.5-py3-none-any.whl.
File metadata
- Download URL: gsearchpy-0.1.5-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ed12befcb615355936045e355fde9a89ac7d9a1b4a437c19196469cd9397812
|
|
| MD5 |
a1af6d15e3bf3066029e56793a455bad
|
|
| BLAKE2b-256 |
7d9060af8c8b21311e060e5ce046a5d41ee78348522c1f9d5cb0b859c2e4f719
|