diff options
Diffstat (limited to 'lib/DBInfoscreen/Helper/Marudor.pm')
-rw-r--r-- | lib/DBInfoscreen/Helper/Marudor.pm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/DBInfoscreen/Helper/Marudor.pm b/lib/DBInfoscreen/Helper/Marudor.pm index f2a58cf..60ab17a 100644 --- a/lib/DBInfoscreen/Helper/Marudor.pm +++ b/lib/DBInfoscreen/Helper/Marudor.pm @@ -12,6 +12,7 @@ use DateTime; use Encode qw(decode encode); use Mojo::JSON qw(decode_json); use Mojo::Promise; +use Mojo::Util qw(url_escape); use XML::LibXML; sub new { @@ -144,6 +145,9 @@ sub get_train_utilization { return $promise; } + $this_station = url_escape($this_station); + $next_station = url_escape($next_station); + $self->get_json_p( $self->{realtime_cache}, "https://marudor.de/api/hafas/v2/auslastung/${this_station}/${next_station}/${train_no}/${dep}" )->then( |