From 909b930f85f449568dd57f1da0e6db318bd7b3e5 Mon Sep 17 00:00:00 2001 From: trizen Date: Sun, 2 Aug 2020 13:38:27 +0300 Subject: - Starting with September 30th, use "invidious.snopyta.org" instead. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jesús --- lib/WWW/FairViewer.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/WWW/FairViewer.pm b/lib/WWW/FairViewer.pm index 89c3c63..f9894ea 100644 --- a/lib/WWW/FairViewer.pm +++ b/lib/WWW/FairViewer.pm @@ -93,7 +93,7 @@ my %valid_options = ( refresh_token => {valid => [qr/^.{15}/], default => undef}, authentication_file => {valid => [qr/^./], default => undef}, - api_host => {valid => [qr{[-\w]+\.[-\w]+}], default => "https://invidio.us"}, + api_host => {valid => [qr{[-\w]+\.[-\w]+}], default => "https://invidious.snopyta.org"}, # No input value allowed api_path => {valid => q[], default => '/api/v1/'}, @@ -503,6 +503,12 @@ sub get_api_url { $host = 'https://' . $host; # default to HTTPS } + # After October 1st, the invidio.us API will no longer work. + # Starting with September 30th, use "invidious.snopyta.org" instead. + if (time > 1601424000 and $host =~ m{^https://(?:www\.)?invidio\.us\b}) { + $host = "https://invidious.snopyta.org"; + } + join('', $host, $self->get_api_path); } -- cgit v1.2.3