diff options
| author | Astrid Smith | 2010-09-16 20:14:01 -0700 |
|---|---|---|
| committer | Astrid Smith | 2010-09-16 20:14:01 -0700 |
| commit | 727d9bea0598b9c31da25b9a7bf86fe26a93c9a8 (patch) | |
| tree | e0ebdb95c8c658a7eea887795eb2e31a90c4738e /wikiscraper.pl | |
| parent | dc7e37f6627146e68e0fd6d2c102be2062a2ae0b (diff) | |
Using MediaWiki::API now
Diffstat (limited to 'wikiscraper.pl')
| -rwxr-xr-x | wikiscraper.pl | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/wikiscraper.pl b/wikiscraper.pl index 6c62c4d..6126e71 100755 --- a/wikiscraper.pl +++ b/wikiscraper.pl @@ -5,6 +5,19 @@ use warnings; use strict; -require LWP::UserAgent; +require MediaWiki::API; + +my $api_url = shift @ARGV; +# http://wikiti.brandonw.net/api.php + +my $page = shift @ARGV; +# 83Plus:Ports:57 + +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}; -my $wiki = shift @ARGV; |
