Page MenuHomePhabricator
Authored By
bzimport
Nov 21 2014, 10:27 PM
Size
523 B
Referenced Files
None
Subscribers
None
#! /usr/bin/perl -w
use strict;
use WWW::Mechanize;
my $mech = WWW::Mechanize->new(agent=>'bug test');
my $url = 'http://en.wikipedia.org/w/index.php?title=Special:Export';
sub export( $;$ ) {
my $url = shift;
my $pagelist = shift;
my %fields = (templates=>1, curonly=>1, pages=>$pagelist);
$mech->get($url);
$mech->submit_form(with_fields=> \%fields);
if ($mech->content() =~ /^<mediawiki /) {
print $mech->content();
} else {
warn "Bogus content";
}
}
export ($url, 'Main_Page');

File Metadata

Mime Type
text/x-perl
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4931
Default Alt Text
bug.pl (523 B)

Event Timeline