get_routes.py 461 B

1234567891011121314151617181920212223
  1. ## SPDX-License-Identifier: MIT
  2. from bjbus import *
  3. for i in range(1, 1000):
  4. routes = search_routes_exact(i)
  5. for r in routes:
  6. print(r['caption'])
  7. if r['direction'] == '1':
  8. print('上行')
  9. else:
  10. print('下行')
  11. print(r['lineLength']+'km')
  12. print(r['serviceTime'])
  13. stops = show_stops(r['lineId'])
  14. for stop in stops:
  15. print(stop['stopName'])
  16. print('')