Skip to content

Instantly share code, notes, and snippets.

@pa1pal
Created March 14, 2016 11:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pa1pal/b43a5a8e03b5b872177f to your computer and use it in GitHub Desktop.
Save pa1pal/b43a5a8e03b5b872177f to your computer and use it in GitHub Desktop.
This is a script checks for Result of DU
#This is a script checks for Result of DU
import urllib2
import re
import os
import time
while 1:
html_content = urllib2.urlopen('http://du.ac.in/du/index.php?page=students-welfare').read() #Change url as per you result website
matches = re.findall('B.Tech. (I.T. and Mathematical) CIC :- V-Semester',html_content);
if len(matches) == 0:
os.system("notify-send 'Oh..' 'Result is not declared yet'") #Enter the keywords
time.sleep(200) #Change time as per your requirement
if len(matches) == 2:
os.system("notify-send 'Shit..' 'Result Declared'")
quit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment