inital
This commit is contained in:
parent
e9a7abae93
commit
c41d49483a
|
@ -0,0 +1,34 @@
|
|||
#! perl
|
||||
|
||||
use strict;
|
||||
|
||||
my $wget="c:/tools/wget/wget.exe";
|
||||
my $transmisson="\"c:/Program Files/Transmission/transmission-remote.exe\"";
|
||||
my $path="d:/peertube_backup";
|
||||
|
||||
system("$wget -nc https://cliptube.org/feeds/videos.atom?accountName=alexlehm -O videos.atom");
|
||||
|
||||
open(XML, "videos.atom");
|
||||
while(<XML>) {
|
||||
chop;
|
||||
|
||||
if(m@<link href="(.*/w/.*)"@) {
|
||||
my $url=$1;
|
||||
$url=~m@/w/(.*)@;
|
||||
my $id=$1;
|
||||
$url =~ s@/w/@/api/v1/videos/@;
|
||||
system("$wget -nc $url");
|
||||
my $torrent="";
|
||||
open(FILE, $id);
|
||||
while(<FILE>) {
|
||||
if(m@"torrentDownloadUrl":"([^\"]*-1080.torrent)"@) {
|
||||
$torrent=$1;
|
||||
system("$transmisson -w $path -a $torrent");
|
||||
}
|
||||
}
|
||||
close FILE;
|
||||
}
|
||||
}
|
||||
|
||||
close XML;
|
||||
|
Loading…
Reference in New Issue