0

I wrote python script to get notification about the out of stock product for one of the E-commerce site. If the product is in stock i want the notification using a pop-up, alarm or something which attract attention. In ubuntu i can use " subprocess.Popen(['notify-send', message]) " but i am not able figure out how to do something like that in windows ?
Script : -

from urllib.request import urlopen
import re 
import subprocess 
# URL to the product
flipkart_url = 
'http://www.flipkart.com/mens-clothing/t-shirts/~spring-summer-2015/prp%5B%5D=facets.brand%255B%255D%3DNike&p%5B%5D=sort%3Dpopularity&sid=2oq%2 Cs9b%2Cj9y&ref=35e28112-55ab-43fa-b988-50e326563a89&otracker=clp_mens-clothing-t-shirts_clp%2FFlipkartFashionModule_2-1_Nike'

flipkart_fetch = str(urlopen(flipkart_url).read())
product = re.findall('Notify me when this product is in Stock',flipkart_fetch)
# message to print
if len(product) == 0:
    message = "your product is back in stock at Flipkart "
# ToDo - Notify using a pop up
else:
    print ('Your product is not available ')
vaibhav.g
  • 729
  • 1
  • 9
  • 28

0 Answers0