-
-
Save JeffersGlass/b2af700280110114b352f1dda0f60421 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 json | |
baseUrl = "https://lapi.transitchicago.com/api/1.0/ttarrivals.aspx" | |
payload = {'key': "da12f3924e734385862aab7ae9b3e514", 'mapid':'40090', 'outputType':'JSON'} | |
response = requests.get(baseUrl, params=payload) | |
workingObject = response.json()['ctatt']['eta'] | |
for arrival in workingObject: | |
print(arrival['stpDe'] + " \t\t" + arrival['arrT'][-8:]) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment