Adding https support. (Missing because a module was not being installed.)

This commit is contained in:
sergiotarxz 2020-12-26 05:01:48 +01:00
parent da4b3af819
commit 539a940bc7
Signed by untrusted user who does not match committer: sergiotarxz
GPG Key ID: E5903508B6510AC2
3 changed files with 6 additions and 1 deletions

View File

@ -19,7 +19,7 @@ There is two alternative ways:
### System install ### System install
``` ```
sudo apt install perl make libwww-perl liburi-encode-perl libjson-perl sudo apt install perl make libwww-perl liburi-encode-perl libjson-perl liblwp-protocol-https-perl
perl Makefile.PL perl Makefile.PL
make make
make install make install

View File

@ -21,6 +21,7 @@ my %handlers = (
die "No url passed" unless @ARGV; die "No url passed" unless @ARGV;
my $handled = 0;
for my $x ( keys %handlers ) { for my $x ( keys %handlers ) {
if ( $response->decoded_content =~ m/$handlers{$x}{reg}/ ) { if ( $response->decoded_content =~ m/$handlers{$x}{reg}/ ) {
eval { $handlers{$x}{subr}->( $ua, $response ); }; eval { $handlers{$x}{subr}->( $ua, $response ); };
@ -28,10 +29,13 @@ for my $x ( keys %handlers ) {
say $@; say $@;
} else { } else {
last; last;
$handled = 1;
} }
} }
} }
say "The url could not be handled, post a issue on https://gitea.sergiotarxz.freemyip.com/sergiotarxz/Peertube-dl/issues telling me the url which does not allow you to download the video so I add support for it." unless $handled;
package Peertube::Downloaders { package Peertube::Downloaders {
sub gocdn { sub gocdn {

View File

@ -1,3 +1,4 @@
requires 'LWP::UserAgent'; requires 'LWP::UserAgent';
requires 'URI::Encode'; requires 'URI::Encode';
requires 'JSON'; requires 'JSON';
requires 'LWP::Protocol::https';