diff options
author | trizen <trizen@protonmail.com> | 2020-08-02 13:38:27 +0300 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2020-08-07 12:41:20 -0500 |
commit | 909b930f85f449568dd57f1da0e6db318bd7b3e5 (patch) | |
tree | ea678c800fbe266931264bf7e97df2163e193ada | |
parent | d180970af29e19c35cde5242adb4df41c1a85e9d (diff) | |
download | fair-viewer-909b930f85f449568dd57f1da0e6db318bd7b3e5.tar.lz fair-viewer-909b930f85f449568dd57f1da0e6db318bd7b3e5.tar.xz fair-viewer-909b930f85f449568dd57f1da0e6db318bd7b3e5.zip |
- Starting with September 30th, use "invidious.snopyta.org" instead.
Signed-off-by: Jesús <heckyel@hyperbola.info>
-rw-r--r-- | lib/WWW/FairViewer.pm | 8 |
1 files changed, 7 insertions, 1 deletions
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); } |