Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
return JSON array instead of plain string
  • Loading branch information
ciudilo committed Sep 18, 2011
1 parent 537e784 commit 0963384
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion parse_countdown.py
@@ -1,7 +1,7 @@
#!/usr/bin/python

from BeautifulSoup import BeautifulSoup
import urllib, sys
import urllib, sys, json

if (len(sys.argv) > 1):
doc = urllib.urlopen("http://accessible.countdown.tfl.gov.uk/arrivals/" + sys.argv[1])
Expand Down Expand Up @@ -32,3 +32,5 @@ def textOf(soup):
duein = str(i[2])
print busNum + " " + dest + " " + duein

json_data = json.dumps(textGroups)
print json_data

0 comments on commit 0963384

Please sign in to comment.