Skip to main content

A Flask-based business scraper leveraging Playwright and Google Maps

Project description

Hexaa Business Scraper

Hexaa Business Scraper is a Python library designed for scraping business information from Google Maps. With minimal setup, users can extract details like business names, addresses, websites, phone numbers, reviews, and more by simply importing the library and passing relevant parameters.


Installation

Install the package using pip:

pip install hexaa-business-scraper

Usage

After installation, you can import the library and use its main function to scrape business data.

Example

from hexaa_business_scraper import scrape_data_cli

search_query = "restaurants in New York"  # Search term for businesses
total_results = 10  # Number of results to scrape

# Scrape and save results to a CSV file
scrape_data_cli(search_query, total_results)

Parameters:

search_query = "restaurants in New York" # Search term for businesses total_results = 10 # Number of results to scrape

Scrape and save results to a CSV file

scrape_businesses(search_query, total_results) This example scrapes 10 businesses based on the search query and saves the results in a CSV file named result.csv.

Parameters

The scrape_businesses function accepts the following parameters:

search_query (str): The search term to look for (e.g., "hotels in Paris"). total_results (int): The number of businesses to scrape. Default is 10.

Output

The scraper saves the scraped data in a CSV file named result.csv with the following fields:

Business Name Address Website Phone Number Review Count Average Rating Business Type Opening Hours Notes Make sure to have Playwright installed and set up properly.

For Playwright setup, run the following command after installing the library:

playwright install

Happy Scraping! 🚀

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

hexaa_business_scraper-0.3.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

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

hexaa_business_scraper-0.3-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file hexaa_business_scraper-0.3.tar.gz.

File metadata

  • Download URL: hexaa_business_scraper-0.3.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.2

File hashes

Hashes for hexaa_business_scraper-0.3.tar.gz
Algorithm Hash digest
SHA256 e547683b16e54f247c9c6959a317e1922f1cd7a746470c99904e0cecadad4a4c
MD5 8cc7e6847905c7ffcb5f8777710e7fa1
BLAKE2b-256 b0bb859d7b51a6aa9d32d93ba9b4583ba3560266c2a12f9902b4e5fae87e321f

See more details on using hashes here.

File details

Details for the file hexaa_business_scraper-0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for hexaa_business_scraper-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2792c0391030927d4988e01f92f2111e61b9fda77aab2c9ec47a061832e36d33
MD5 d0916e4a682c31e7be65a6fcbd2ba46c
BLAKE2b-256 7ba8304ca209d4f1e1de7ea8a2c50050b94f1cd9006c18acf960b2cfcc875802

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