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_businesses

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.2.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.2-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hexaa_business_scraper-0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 b4e9193c394648a0160e69060a9f4cbb99c665a2efa2a3323878b556d27eb2cc
MD5 01048581c725f876fed0d708342e56c5
BLAKE2b-256 10ed41a6d7d725cf7a13b2aefe1ec24ea0d5170f70de9f2549857eb0896188de

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for hexaa_business_scraper-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1b1b1b959465b9c0a68c81da270a9bc20be76d40165bcfe3c49b2401ca8b09c8
MD5 9df4b0fc04aa8d7addf5b6a93d871c8c
BLAKE2b-256 df0acf1aa10f7e04dd408acc4c3a49bde84725236a0e8cebd44d242eeac20bbb

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