Leser: 4
|< 1 2 3 4 >| | 35 Einträge, 4 Seiten |
1
2
<form action="http://rs208.rapidshare.com/files/47486343/PowerOptions.pdf" method="post">
<input type="submit" name="dl.start" value="PREMIUM"></td><td align="center"><input type="submit" name="dl.start" value="Free">
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#!/usr/bin/perl -w use strict; use diagnostics; use Data::Dumper; use WWW::Mechanize; my $mech = WWW::Mechanize->new; $mech->add_header( 'accept-language' => 'de'); $mech->get('http://www.rapidshare.com/files/47486343/PowerOptions.pdf'); $mech->click_button( name => "dl.start", value => "Free" ); print $mech->content;
$mech->click_button( number => "2" );
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
#!/usr/bin/perl -w use strict; use diagnostics; use Data::Dumper; use WWW::Mechanize; my $mech = WWW::Mechanize->new; $mech->proxy(['http', 'ftp'], '81.29.249.17:3128'); $mech->add_header( 'accept-language' => 'de'); $mech->get("http://www.rapidshare.com/files/47486343/PowerOptions.pdf"); $mech->click_button( number => "2" ); my $content = $mech->content; if ( $content =~ /\(\w+\s\w+\s(.*)\s\w+\)/i ) { print "warte $1 Minute(n)."; } elsif ( $content =~ /Kein Premium-User/i ) { print "Kein Premium-User.\n"; } elsif ( $content =~ /Zu viele Benutzer laden gerade Dateien runter/i ) { print "Zu viele Benutzer laden gerade Dateien runter." } else { print "Unknown error"; }
QuoteE:\perl>perl proxy3.pl
Use of uninitialized value in hash element at C:/Perl/lib/LWP/Protocol.pm line
55 (#1)
(W uninitialized) An undefined value was used as if it were already
defined. It was interpreted as a "" or a 0, but maybe it was a mistake.
To suppress this warning assign a defined value to your variables.
To help you figure out what was undefined, perl tells you what operation
you used the undefined value in. Note, however, that perl optimizes your
program and the operation displayed in the warning may not necessarily
appear literally in your program. For example, "that $foo" is
usually optimized into "that " . $foo, and the warning will refer to
the concatenation (.) operator, even though there is no . in your
program.
Use of uninitialized value in pattern match (m//) at
C:/Perl/lib/LWP/Protocol.pm line 58 (#1)
Use of uninitialized value in concatenation (.) or string at
C:/Perl/lib/LWP/Protocol.pm line 38 (#1)
Use of uninitialized value in string eq at C:/Perl/lib/LWP/UserAgent.pm line
195 (#1)
Can't call method "find_input" on an undefined value at
C:/Perl/site/lib/WWW/Mechanize.pm line 1586 (#2)
(F) You used the syntax of a method call, but the slot filled by the
object reference or package name contains an undefined value. Something
like this will reproduce the error:
$BADREF = undef;
process $BADREF 1,2,3;
$BADREF->process(1,2,3);
Uncaught exception from user code:
Can't call method "find_input" on an undefined value at C:/Perl/site/lib
/WWW/Mechanize.pm line 1586.
at C:/Perl/site/lib/WWW/Mechanize.pm line 1586
WWW::Mechanize::click_button('WWW::Mechanize=HASH(0x1f6efb8)', 'number',
2) called at proxy3.pl line 17
QuoteE:\perl>perl proxy3.pl
Can't call method "find_input" on an undefined value at
C:/Perl/site/lib/WWW/Mechanize.pm line 1586 (#1)
(F) You used the syntax of a method call, but the slot filled by the
object reference or package name contains an undefined value. Something
like this will reproduce the error:
$BADREF = undef;
process $BADREF 1,2,3;
$BADREF->process(1,2,3);
Uncaught exception from user code:
Can't call method "find_input" on an undefined value at C:/Perl/site/lib
/WWW/Mechanize.pm line 1586.
at C:/Perl/site/lib/WWW/Mechanize.pm line 1586
WWW::Mechanize::click_button('WWW::Mechanize=HASH(0x1f6e8fc)', 'number',
2) called at proxy3.pl line 15
or die();
|< 1 2 3 4 >| | 35 Einträge, 4 Seiten |