Scrapes Czech public transport data from IDOS
Project description
IDOS scraper
This package scrapes data from Czech public transport provided on page idos.idnes.cz.
You can search connections, page more connections (uses web contex from search connections and ajax queries) or search stations by name or location. For more info, go take a look at sources in idos_scraper.scrapers:
- search_connections.py - Search connections
- Searches only from ../vlakyautobusymhdvse/..
- page_connections.py - Page connections
- search_station.py - Finding stations
- For now the station scraper scrapes from ../ostrava/.. url - Only stations in Ostrava city
More filtes (PID, ODIS, IDOL, ...) are comming later.
TLDR
You will mainly use these 2 functions:
def SearchConnectionsByStation(station_from: str = "Horni polanka", station_to: str = "VŠB-TUO", time: str | None = None, date: str | None = None) -> dict:
def SearchStation(station_short_str: str, number_of_hints_to_query: str | int = 3):
And their async
variants:
async def async_SearchConnectionsByStation(station_from: str = "Horni polanka", station_to: str = "VŠB-TUO", time: str | None = None, date: str | None = None) -> dict:
async def async_SearchStation(station_short_str: str, number_of_hints_to_query: str | int = 3):
Not yet fully implemented:
def SearchConnectionsByLocation(station_from: str | None = None, station_to: str = "VŠB-TUO", time: str | None = None, date: str | None = None) -> dict:
def async_SearchConnectionsByLocation(station_from: str | None = None, station_to: str = "VŠB-TUO", time: str | None = None, date: str | None = None) -> dict:
Examples
For examples how to use this module, run:
python3 -m idos_scraper.examples.ui_search_station
or
python3 -m idos_scraper.examples.search_and_page_connection
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file idos_scraper-0.2.3.tar.gz
.
File metadata
- Download URL: idos_scraper-0.2.3.tar.gz
- Upload date:
- Size: 33.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39f54a2bfd990167cf04f91078800438ba51187e7c546e0a6566d16ea66f1e64 |
|
MD5 | 6d2c1714846ea68a3f321938e2e3df07 |
|
BLAKE2b-256 | cc4d012b48594d17561ad62e259b75e77837e51c09c147f1878f1f621eb72b4b |
File details
Details for the file idos_scraper-0.2.3-py3-none-any.whl
.
File metadata
- Download URL: idos_scraper-0.2.3-py3-none-any.whl
- Upload date:
- Size: 14.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 737fbb345931f9b7694b675acb7d44bdba2f3b326c18c0e729a020b6b42baef0 |
|
MD5 | 573d7088ce77882fa093167908835706 |
|
BLAKE2b-256 | 03ea27a0cab5b3d40bfd65564d9865e4de7c80c6577dc6251c5de14c6b14ac71 |