summaryrefslogtreecommitdiff
path: root/wikiscraper.pl
diff options
context:
space:
mode:
Diffstat (limited to 'wikiscraper.pl')
-rwxr-xr-xwikiscraper.pl17
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;