Walmart.com Store Locator Web Scraper written in Python to extract store locations available based on a zip code. If you would like to know more about this scraper you can check it out at the blog post 'How to Scrape Store Locations from Walmart using Python' - https://www.scrapehero.com/how-to-scrape-store-locations-from-walmart-com-using-python-3/
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
This walmart scraper can extract the following fields below:
- Store Name
- Store ID
- Distance (in miles) from a given zip code
- Address
- Zip Code
- City
- Phone Number
For this web scraping tutorial using Python 3, we will need some some packages:
- Python requests
- UnicodeCSV
PIP to install the following packages in Python (https://pip.pypa.io/en/stable/installing/)
Python Requests, to make requests and download the HTML content of the pages (http://docs.python-requests.org/en/master/user/install/)
Python LXML, for parsing the HTML Tree Structure using Xpaths (Learn how to install that here – http://lxml.de/installation.html)
We will execute the code with the script name followed by the arugument for zip code. here is an example to find the store locations and its details in Boston, MA
python3 walmart_store_retreiver.py 20005
This will create a CSV file: