Created
July 11, 2019 11:59
-
-
Save spacemeowx2/474e0ed62aabf712b72da511b00bf205 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/usr/bin/env python3 | |
import shbus.realtime | |
line = '733路' | |
direction = True | |
stop = 0 | |
client = shbus.realtime.client() | |
response = client.getRealtimeBus(line, stop, direction=direction) | |
print(response.info.routes[0 if direction else 1].names[stop]) | |
for i in response.items: | |
print('%s: 发车时间: %s' % (i.vehicle, i.time)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment