Created
December 6, 2014 08:40
-
-
Save tjb0607/0c4094786976d4af6f7a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import subprocess | |
import urllib.request | |
import time | |
import re | |
while True: | |
print('checking') | |
response = urllib.request.urlopen('http://honestjons.com/shop/latest_100_arrivals') | |
plaintext = response.read().decode('utf-8') | |
if re.search('Loefah', plaintext, flags=re.I): | |
print('found Loefah release on Honest Jon\'s!!!') | |
break | |
print('waiting 10 seconds') | |
time.sleep(10) | |
subprocess.call(["xdg-open", "http://honestjons.com/shop/latest_100_arrivals"]) | |
subprocess.call(["amixer", "sset", "'Master'", "50%"]) | |
subprocess.call(["ffplay", "-nodisp", "-autoexit", "<<INSERT FILEPATH OF NOTIFICATION SOUND HERE>>"]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment