
Research
PyPI Package Disguised as Instagram Growth Tool Harvests User Credentials
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Unofficial API to retrieve STCP information for public transit buses in Porto, Portugal
Unofficial API to retrieve STCP information for public transit buses in Porto, Portugal.
Retrieves static data about lines, stops, locations, and real-time estimates of bus arrivals.
Since it's based on a non-official API, it may stop working in the future. Confirmed working as of 24 February 2024.
See the files at stcp/api.py and stcp/util.py for the complete documentation, and examples.md for usage examples.
Function | Description |
---|---|
get_lines | gets a list of all STCP lines. |
get_line_directions | gets a list of directions (usually 2) of a line. |
get_line_stops | gets a list of all stops of a line. |
get_stop_data | gets information about a stop, including a list of all the lines that pass through it. |
get_stop_real_times | gets a real-time list of buses passing through a stop soon (up to one hour from the current time). |
Function | Description |
---|---|
get_all_stops | gets a set of all STCP stop codes across all lines. |
stop_departures | gets a map of upcoming departures of a stop, grouped by line. |
follow_line | gets the current times for a given line. |
To be able to get a stop's real-time departures, a "hash" is needed, which can be obtained by scraping STCP's webpage.
These hashes are stored in a local CSV cache for efficiency purposes, which is generated on the first execution.
However, the cache can be disabled, and the hash request can be made on-the-fly, by passing use_hash_cache=False
to
the get_stop_real_times function.
FAQs
Unofficial API to retrieve STCP information for public transit buses in Porto, Portugal
We found that stcp-api demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.