Yellowpages.com Web Scraper written in Python and LXML to extract business details available based on a particular category and location.
If you would like to know more about this scraper you can check it out at the blog post 'How to Scrape Business Details from Yellow Pages using Python and LXML' - https://www.scrapehero.com/how-to-scrape-business-details-from-yellowpages-com-using-python-and-lxml/
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
This yellow pages scraper can extract the fields below:
- Rank
- Business Name
- Phone Number
- Business Page
- Category
- Website
- Rating
- Street name
- Locality
- Region
- Zipcode
- URL
PIP to install the following packages in Python (https://pip.pypa.io/en/stable/installing/)
Run the following command to install the required packages.
pip install -r requirements.txt
We would execute the code with the script name followed by the positional arguments keyword and place. Here is an example to find the business details for restaurants in Boston. MA.
python3 yellow_pages.py restaurants Boston,MA
This will create a csv file: