So I wrote a quick python script this morning that I will leave running all day that will check both the Nexus 8GB and Nexus 16GB pages to see if anything on the pages has changed (MD5 Hash). If it has, it will email you as soon as the page changes. I wrote this so I don't have to sit there all day killing my F5 key. Here's the code:
Code:
import urllib
import hashlib
import time
import smtplib
import string
google_pages = {'https://play.google.com/store/devices/details?id=nexus_4_8gb':'6563c52c9711cb614c9daffdc9c55ee5', 'https://play.google.com/store/devices/details?id=nexus_4_16gb':'1aab1c70346b85075c0c63166c044eb7'}
count = 0
while True:
count += 1
if not count % 60:
print 'Ran: %s' % count
time.sleep(30)
for google_page in google_pages.keys():
page_file = urllib.urlopen(google_page)
page_html = page_file.read()
page_md5 = hashlib.md5(page_html).hexdigest()
if page_md5 != google_pages[google_page]:
#MAKE SURE TO REPLACE THE LINE BELOW WITH YOUR EMAIL
email = 'youremail@example.com'
server = smtplib.SMTP('localhost')
msg = string.join((
"From: %s" % email,
"To: %s" % email,
"Subject: %s" % 'NEXUS 4 ON SALE',
"",
"NEXUS 4 ON SALE! MD5 %s DOES NOT MATCH %s\n\n%s" % (page_md5, google_pages[google_page], google_page)
), "\r\n")
server.sendmail(email, email, msg)
server.quit()
exit()