This code is provided as-is, it was used by the author to find an apartment in Helsinki and should not be considered production ready. The script was not written with readability or performance in mind.
The script was run on an x86-64 machine running Manjaro Linux, other platforms have not been tested.
You will need a Digitransit API key to use the HSL API https://digitransit.fi/en/developers/
Poetry is used for dependency management, install it with pip install poetry
.
-
Install dependencies
$ poetry install
-
Copy the example environment file
$ cp .env.example .env
-
Edit the environment file and add your Digitransit API key
$ vim .env
$ poetry run ./scrape.py
This will create a html file in /tmp/
containing your search results.