{"repo":"oxylabs/how-to-build-a-price-tracker","free":true,"listed":false,"github":"https://github.com/oxylabs/how-to-build-a-price-tracker","clone":"git clone https://github.com/oxylabs/how-to-build-a-price-tracker.git","description":"How to Build a Price Tracker With Python","language":"Python","stars":12,"topics":["github-python","pandas-python","price-drop","price-monitoring","price-tracker","python","scraper","price-tracker-website","screen-scraping"],"license":null,"category":"scrapers-browser-automation","readme_excerpt":"How to Build a Price Tracker With Python Project requirements The following price monitoring script works with Python version 3.6 and above. The recommended libraries are as follows: Requests – for sending HTTP requests. In other words, for downloading web pages without a browser. It’s the essential library for the upcoming price monitoring script. BeautifulSoup – for querying the HTML for specific elements. It’s a wrapper over a parser library. lxml – for parsing the HTML. An HTML retrieved by the Requests library is a string that requires parsing into a Python object before querying. Instead of directly using this library, we’ll use BeautifulSoup as a wrapper for a more straightforward API. Price-parser – a library useful for every price monitoring script. It helps to extract the price component from a string that contains it. smtplib – for sending emails. Pandas – for filtering product data and reading and writing CSV files. Optionally, creating a virtual environment will keep the whole process more organized: To install the dependencies, open the terminal and run the following command: Note that the smtlib library is part of Python Standard Library and doesn’t need to be installed separately. Once the installation is complete, create a new Python file and add the following imports: Additionally, add the following lines for initial configuration: The CSV that contains the target URLs is supplied as PRODUCT URL CSV . If the SAVE TO CSV flag is set to True , the fetched pric","default_branch":null,"files":null,"tree":[],"storefront":"/r/oxylabs","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/oxylabs/how-to-build-a-price-tracker/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}