Leser: 24
1
2
3
4
5
6
7
{{NEWPAGE>[]}} (textarea)
do[save]=Speichern (submit)
do[preview]=Vorschau (submit)
do[draftdel]=Abbrechen (submit)
summary= (text)
minor=<UNDEF> (checkbox) [*<UNDEF>/off|1]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/perl -w
use strict;
use warnings;
use WWW::Mechanize;
my $browser = WWW::Mechanize->new();
$browser->get("http://internetseite");
my @formulare = $browser->forms();
foreach my $formular ( @formulare ) {
printf $formular->dump(), "\n";
}
$mech->field( $feldname, $value );
Quote{{NEWPAGE>[]}} (textarea)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
POST http://irgend/eine/page [editform]
np_cat= (hidden readonly)
title= (text)
do=edit (hidden readonly)
<NONAME>=Seite hinzuf�gen (submit)
POST http://irgend/eine/page
do=edit (hidden readonly)
rev= (hidden readonly)
id=erste.seite (hidden readonly)
<NONAME>=Diese Seite bearbeiten (submit)
GET http://irgend/eine/page
do=logout (hidden readonly)
sectok=540e1ff31859ff071bbf4e6aae35c114 (hidden readonly)
id=erste.seite (hidden readonly)
<NONAME>=Abmelden (submit)
GET http://irgend/eine/page
do=search (hidden readonly)
id= (text)
<NONAME>=Suche (submit)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{{NEWPAGE>[]}} (textarea)
np_cat= (hidden readonly)
title= (text)
do=edit (hidden readonly)
<NONAME>=Seite hinzuf�gen (submit)
POST http://irgend/eine/page
do=edit (hidden readonly)
rev= (hidden readonly)
id=erste.seite (hidden readonly)
<NONAME>=Diese Seite bearbeiten (submit)
GET http://irgend/eine/page
do=logout (hidden readonly)
sectok=540e1ff31859ff071bbf4e6aae35c114 (hidden readonly)
id=erste.seite (hidden readonly)
<NONAME>=Abmelden (submit)
GET http://irgend/eine/page
do=search (hidden readonly)
id= (text)
<NONAME>=Suche (submit)
$browser->field('wikitext', $html);
2009-11-04T07:43:49 LELeider hat das aber auch nicht funktioniert.
$browser->field('wikitext', $html);
$browser->submit() or die "can not send: \n $!";
$browser->field('wikitext', $html);
1
2
3
4
5
6
7
8
9
10
11
12
13
sysopen (HTML, "/root/bin/Datei.html", O_RDONLY, 0600) or die "can not read: $!";
while (<HTML>){
chomp;
$h=$_;
$browser->form_number(1);
$browser->field('wikitext', $h);
$browser->submit() or die "can not send:$!";
}
close (HTML);
$browser->click();