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.4.tar.gz (5.8 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.4-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hexaa_business_scraper-0.4.tar.gz
  • Upload date:
  • Size: 5.8 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.4.tar.gz
Algorithm Hash digest
SHA256 9f1b68c5ff984f98144aff3d36d73724fc983214e0032d81a37d24784f2f713c
MD5 e928d497df23e353c5f69e3a209683db
BLAKE2b-256 90a472a50f7af6257ac2da0ececeb7060eb240dbee55dbf9d48ee0a1025bc8f1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for hexaa_business_scraper-0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 1e471e9f124fa86a46ad49b73e50cf74538f9bf4b07e70f3e9097a90a6589db7
MD5 d0e82872d9ec594074b62b430f962596
BLAKE2b-256 c39bf810b5398b614a372e384be8c18921c2ebcd031caa059023daaec55b88b4

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