Skip to content

Instantly share code, notes, and snippets.

@markroxor
Created November 15, 2017 08:35
Show Gist options
  • Save markroxor/3bdfe34c762697809ddef0d3d226a831 to your computer and use it in GitHub Desktop.
Save markroxor/3bdfe34c762697809ddef0d3d226a831 to your computer and use it in GitHub Desktop.
wip
import urllib2
import json
import pickle
import time
while True:
response = urllib2.urlopen('http://122.252.246.246:8081/MMTSLiveeng.html')
html = response.read()
js = json.loads(html)
print(js)
#print(js['FL'])
f = open("stations",'r')
stats = pickle.load(f)
f.close()
#for st in js:
# print st
f = open("stations","wb")
f.close()
time.sleep(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment