import datetime
import urllib
import sys
import os
import platform
blogPage = "http://blog.dota2.com"
hypeString = "Hype is building"
clearCommand = "clear"
if (platform.system() == 'Windows'):
clearCommand = 'cls'
while True:
page = urllib.urlopen(blogPage).read()
if "6.87" in page:
print("6.87-related post detected at" + strftime("%a, %d %b %Y %H:%M:%S +0000", localtime())[:25])
break
else:
time.sleep(3)
hypeString += "."
sys.stdout.flush();
if (hypeString[17:] == "..."):
hypeString = "Hype is building."
os.system(clearCommand)
print(hypeString);
webbrowser.open(blogPage)
webbrowser.open("http://www.youtube.com/watch?v=-kcOpyM9cBg&t=7m21s")
print("MAXIMUM HYPE ACHIEVED")