Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 617 Bytes

README.md

File metadata and controls

26 lines (18 loc) · 617 Bytes

jBHTrans

Python script to check bus locations in Belo Horizonte - Brazil.

Requires BeautifulSoup 4 and Requests, you can install them with pip:

[sudo] pip install bs4
[sudo] pip install requests

Usage

There are two main methods: getAvailableBusLines and getBusLocations. The former returns all available bus lines and the latter returns all available bus locations for a line.

Example:

from jBHTrans import jBHTrans

j = jBHTrans()
lines = j.getAvailableBusLines()
locations = j.getBusLocations(lineNumber=lines[10]["lineNumber"], lineName=lines[10]["lineName"])