Leser: 3
7 Einträge, 1 Seite |
<FORM METHOD=POST NAME=FltWiz ACTION="/pub/agent.dll?tovr=-1294767292&ps3u=" >
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/perl
use strict;
use warnings;
use WWW::Mechanize;
my $mech = WWW::Mechanize->new();
my $url = "http://www.expedia.com/pub/agent.dll?qscr=fltw&rfrr=-1066";
$mech->get( $url );
$mech->form_name( "FltWiz" );
$mech->set_fields("city1" => "Frankfurt");
1
2
There is no form named "FltWiz" at ./mechanize.pl line 11
No form defined at ./mechanize.pl line 13
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/perl
use strict;
use warnings;
use WWW::Mechanize;
my $mech = WWW::Mechanize->new();
my $url = "http://www.expedia.com/pub/agent.dll?qscr=fltw&rfrr=-1066";
$mech->get( $url );
print $_ . "\n" for @{ $mech->forms() };
print $_ . "\n" for @{ $mech->forms() };
1
2
3
4
5
6
7
8
9
10
#!/usr/bin/perl
use strict;
use warnings;
use WWW::Mechanize;
my $mech = WWW::Mechanize->new();
my $url = "http://www.expedia.com/pub/agent.dll?qscr=fltw&rfrr=-1066";
$mech->get( $url, ":content_file"=>"c:\\temp.tmp");
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/perl
use strict;
use warnings;
use WWW::Mechanize;
my $mech = WWW::Mechanize->new();
my $url = "http://www.expedia.com/pub/agent.dll?qscr=fltw&rfrr=-1066&&zz=" .time() . "&";
print "[$url]\n";
$mech->add_header("Cookie" => "jscript=1");
$mech->get( $url, ":content_file"=>"c:\\temp.tmp");
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use strict;
use warnings;
use LWP::UserAgent;
my $lwp = new LWP::UserAgent;
$lwp->default_header("Cookie" => "jscript=1");
my $resp = $lwp->post("http://www.expedia.com/pub/agent.dll?qscr=fltw&rfrr=-1066&&zz=" .time() . "&",
{ city1 => 'Frankfurt',
pcity1=> 'Berlin, Germany (BER-All Airports)',
date1 => '09/10/05',
date2 => '11/10/05'
}
);
print $resp->content;
7 Einträge, 1 Seite |