Created
May 19, 2015 04:17
-
-
Save icchy/923ed6fcf4565913a55a 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
import requests | |
import time | |
url = "https://2015.legitbs.net/scoreboard#" | |
cur = "" | |
html = requests.get(url).text | |
tmp = html.split('\n') | |
for c in tmp: | |
if "class='locked'" in c: | |
cur += c | |
while (1): | |
time.sleep(60) | |
res = "" | |
try: | |
html = requests.get(url).text | |
except: | |
continue | |
tmp = html.split('\n') | |
for c in tmp: | |
if "class='locked'" in c: | |
res += c | |
if res != cur: | |
pass # do something | |
cur = res |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment