diff options
| -rwxr-xr-x | wikiscraper.pl | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/wikiscraper.pl b/wikiscraper.pl index 6126e71..3fdce75 100755 --- a/wikiscraper.pl +++ b/wikiscraper.pl @@ -17,7 +17,20 @@ my $name = shift @ARGV; my $password = shift @ARGV; my $mw = MediaWiki::API->new( { api_url => $api_url } ); -$mw->login( { lgname => $name, - lgpassword => $password } ) - || die $mw->{error}->{code} . ': ' . $mw->{error}->{details}; - +print $api_url, "\n"; +#$mw->login( { lgname => $name, +# lgpassword => $password } ) +# || die $mw->{error}->{code} . ': ' . $mw->{error}->{details}; + +my $revs = $mw->api( + { action => 'query', + prop => 'categorymembers', + cmtitle => 'Category:68k', + cmlimit => 'max', + } ); + +print join('**', %$revs->{'warnings'}), "\n"; + +foreach (@{$revs}) { + print "$_->{title}\n"; +} |
