diff options
| author | Astrid Smith | 2010-09-16 20:53:41 -0700 |
|---|---|---|
| committer | Astrid Smith | 2010-09-16 20:53:41 -0700 |
| commit | 69a0eeebd89686a350e43a4764fbe2cfc000c35c (patch) | |
| tree | 63bbaaef4fab1bdef99a658c1580b4c5a8359da5 /wikiscraper.pl | |
| parent | 727d9bea0598b9c31da25b9a7bf86fe26a93c9a8 (diff) | |
Nothing works :(
Diffstat (limited to 'wikiscraper.pl')
| -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"; +} |
