Hello, I need a python script to scrape information from another website and create a comma delimited file with the information. This script will be used to update stock levels. The script will also notify me via email if the URL is not found or if the price on the URL has changed. The python script should use sendmail to send the emails (this script will be hosted on a Linux computer)
The python script should read the data from a input data file that’s in a delimited format that will contain the following fields.
product code, Members Price, product url
The python script should go to the URL and look for the field 'Quantity in Stock:' and take that info and put it into a output CSV file that will contain these two fields
product code, Quantity
Two other checks should happen.
1. If the url is not found then the Quantity should be set to 0 on the output file field 'Quantity' and an email should be sent letting us know the product url could not be found.
2. if the input field "Members Price" does not equal the Members Price field on the URL a email notification should be sent displaying both the price we have in the input file and what the price was actually noted as on the websites url.
Note: the website does require a user to login via a webform. the login and password will be provided once the project is accepted.