From 3608321c558da618ea122742d2dcc512f8216e66 Mon Sep 17 00:00:00 2001 From: NathanJRollins <11779167+NathanJRollins@users.noreply.github.com> Date: Tue, 6 Jul 2021 21:04:14 -0600 Subject: [PATCH 1/4] Add dynamic station titles fetching --- jsrl-get.pl | 12 +++++++++++- run.bat | 3 +++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 run.bat diff --git a/jsrl-get.pl b/jsrl-get.pl index 0f0f723..2983fc9 100755 --- a/jsrl-get.pl +++ b/jsrl-get.pl @@ -26,7 +26,17 @@ # Songs configuration my $songs_dir = "songs/"; my $jsrl_url = "https://jetsetradio.live/radio/stations/"; -my @stations = ("classic", "future", "ggs", "poisonjam", "noisetanks", "loveshockers", "rapid99", "immortals", "doomriders", "goldenrhinos", "bumps", "summer", "christmas", "halloween", "ultraremixes", "kingforanotherday", "memoriesoftokyoto", "ollieking", "toejamandearl", "crazytaxi", "hover", "butterflies", "revolution", "endofdays", "lofi", "elaquent"); + +# Fetch station titles +my @stations = (); +my $jsrl_url_homepage = "https://jetsetradio.live/"; +my $homepage = $lwp->get($jsrl_url_homepage); +die "Error getting the homepage for '$jsrl_url_homepage'" if $homepage->is_error; +for my $line_homepage (split /^/, $homepage->content) { + if ($line_homepage =~ /