An open API service indexing awesome lists of open source software.

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*

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))