Walmart Web Scraper written in Python 3 to extract coupon details for a store location. If you would like to know more about this scraper you can check it out at the blog post 'How to Scrape Coupons from Walmart using Python 3' -https://www.scrapehero.com/how-to-scrape-coupon-details-from-a-walmart-store-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.
- Discounted Price
- Category
- Brand
- Product Description
- Activated Date
- Expired Date
- URL
For this web scraping tutorial usng Python 3, we will need some some packages:
- Python Requests
- LXML
- 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 script to get the coupon details of store ID 2159:
python3 walmart_coupon_retriever.py 2159
This will create a CSV file: