4 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/perl
use LWP::UserAgent;
use HTML::LinkExtor;
use URI::URL;
use File::Basename;
my $adresse='http://xanpac.de';
my $agent = LWP::UserAgent->new;
my @torrents= ();
sub cb {
my($tag, %attr) = @_;
if ($tag ne 'a') {
return;
}
push(@torrents, values %attr);
}
$extractor = HTML::LinkExtor->new(\&cb);
$ergebnis = $agent->request(HTTP::Request->new(GET => $adresse),sub {$extractor->parse($_[0])});
$basis = $ergebnis->base;
@torrents = map {$_ = url($_, $base)->abs;} @torrents;
foreach (@torrents) {
if($_ =~ /\.torrent$/){
$dl = LWP::UserAgent->new;
$dl->timeout(50);
$antwort = $dl->get($adresse.$_);
$filename = fileparse($_);
if($antwort->is_success) {
open(FH, ">$filename") or die 'datei nicht schreibbar';
print FH $antwort->content;
close(FH);
}
}
}
QuoteIf You don't know what it does, why do you put it in your code
1
2
3
print +(a=>b=>c=>d=>e=>f=>g=>h=>i=>j=>k=>l=>m=>n=>o=>p=>q=>r=>s=>t=>u=>v=>w=>x=>y=>z=>" ")
[9=>20=>18=>19=>-1=>0=>13=>14=>19=>7=>4=>17=>-1=>15=>4=>17=>11=>-1=>7=>0=>2=>10=>4=>17];
4 Einträge, 1 Seite |