Amazon Price Tracker

A software that keeps track a specific item for the user and notifies if price has dropped.

Using various API's such as requests, smtplib and BeautfulSoup, I manage to connect to a URL of an Amazon item that the user is in. It catches the price integer from the HTML code, and from there it notifies if the price has decreased at any moment in time.

Snippet of Python Code


def priceCheck():
    page = requests.get(url)

    soup = BeautifulSoup(page.content, 'html.parser')

    #Titel and price
    title = soup.find(id='productTitle')
    titleText = title.get_text()
    price = soup.find(id="priceblock_ourprice")
    priceText = price.get_text()

    #converter
    convertPrice = float(priceText[1:7])
    
    print(convertPrice)
    print(titleText)
										

Here is how the user can be notified is by email.


subject= 'Price on Item Went Down!!'
body = 'Check the Link if the price is right https://www.amazon.com/MSI-Gaming-RTX-2080-Super/dp/B07VDMGYGZ/ref=sr_1_1?keywords=gtx+2080&qid=1577723642&sr=8-1'
							
message = f"Subject: {subject}\n\n{body}"
							
server.sendmail
print('HEY, Email has been sent!')
																		
							

In summary, this software is targeted for users who do not have enough funds to purchase an item but is willing to wait and/or save for later time to buy.