From f09cf125e5534f708c57c6fa9e5216ac15642012 Mon Sep 17 00:00:00 2001 From: sergiotarxz Date: Sat, 26 Dec 2020 03:52:11 +0100 Subject: [PATCH] Sugar for users. --- README.md | 30 ++++++++++++++++++++++++++++++ bin/peertube-dl | 2 ++ 2 files changed, 32 insertions(+) diff --git a/README.md b/README.md index d0706bc..bfaac66 100644 --- a/README.md +++ b/README.md @@ -9,4 +9,34 @@ Of course the name means Peertube will be supported someday. ## Supported webpages: animeflv.net + animeflv.cc + +## Installation + +``` +sudo apt install perl make libwww-perl liburi-encode-perl libjson-perl +perl Makefile.PL +make +make install +``` + +## Usage + +`peertube-dl ` + +You can assume the supported url are the ones which have a media player. + +## Disclaimer + +SEEING THE ADS TO SUPPORT THE JOB OF THE DISTRIBUTORS AND CONTENT CREATORS +ASSOCIATED WITH THESE PAGES IS CURRENTLY NOT SUPPORTED BUT CAN BE OPTIONAL +IN A FUTURE. + +THIS SOFTWARE COMES WITH THE HOPE IT WILL BE USEFUL BUT WITHOUT ANY WARRANTY. + +A COPY OF THE LICENSE WHICH APPLIES FOR THIS SOFTWARE (AGPLV3) CAN BE FOUND IN +THE LICENSE FILE. + +IF YOU RUN ANY PART OF THIS CODE ON A SERVER OR DISTRIBUTE IT YOU MUST CONVEY +THE SOURCE CODE IN A HUMAN READABLE FORM. diff --git a/bin/peertube-dl b/bin/peertube-dl index 10a6595..228e68e 100755 --- a/bin/peertube-dl +++ b/bin/peertube-dl @@ -19,6 +19,8 @@ my %handlers = ( animeid => { reg => qr/animeid\.to\/streaming\.php\?/, subr => \&Peertube::Downloaders::animeid }, ); +die "No url passed" unless @ARGV; + for my $x ( keys %handlers ) { if ( $response->decoded_content =~ m/$handlers{$x}{reg}/ ) { eval { $handlers{$x}{subr}->( $ua, $response ); };