https://github.com/eightsq/sbahncrawler
a public transport data crawler script, specifically for *Berlin, Germany*
https://github.com/eightsq/sbahncrawler
Last synced: about 1 year ago
JSON representation
a public transport data crawler script, specifically for *Berlin, Germany*
- Host: GitHub
- URL: https://github.com/eightsq/sbahncrawler
- Owner: EightSQ
- License: mit
- Created: 2019-03-03T15:41:56.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-03T15:46:00.000Z (over 7 years ago)
- Last Synced: 2025-02-15T00:45:20.466Z (over 1 year ago)
- Language: Python
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# S-Bahn Datensammler
Sammelt Echtzeitdaten von Produkten des Berliner ÖPNV.
## Usage
1. Find the Station ID you are interested with [the bvg-rest API project](https://github.com/derhuerst/bvg-rest/blob/master/docs/index.md#get-locations).
2. With Docker:
```
$ docker build -t eightsq/sbahncrawler .
$ docker run \
-v {some_data_path_on_your_machine}:/data:rw \
--rm \
-e CRAWLER_STATIONID={your_station_id} \
eightsq/sbahncrawler:latest
```
Without Docker:
Make sure you have Python 3. Install the `requests` package. Then,
```
$ CRAWLER_STATIONID={your_station_id} python3 crawler.py
```
Actually, since you want to automate this, set up cronjob, that does this regularly for you (like every 10").
To crawl a different product than S-Bahn, adjust the `productId` filter in the `crawl`-Function inside `crawler.py`.
## Author
EightSQ ([Blog](blog.8sq.de))