|The stupid question is the question not asked|
LWP UserAgent to script Mediawiki readsby Sabalon (Initiate)
|on Feb 02, 2012 at 03:26 UTC||Need Help??|
Sabalon has asked for the
wisdom of the Perl Monks concerning the following question:
Hello all. I had a full head of hair before starting this. Now I feel like Kojack!
I am trying to get at some data inside a MediaWiki uh..wiki. I am wanting to make use of the render for print function of index.php to grab out some info and display it elsewhere.
That is why I am not using the MediaWiki::API calls...no way to have it formatted for you, templates, etc...
The response is 200, but the data it returns when I dump it out is the same login page with the cookie message.
If I remove the cookie file before running this, it recreates it, and it does put a cookie in there for the session (however I had to add ignore_discard to get it to do that.)
I have tried several variations - GET vs POST, putting the post variables as content to the request. I tried the mwpush.pl shown here: http://en.wikipedia.org/wiki/User:KeithTyler/mwpush.pl but it fails in the same way (in fact most of my code is ripped from that example since mine wasn't working)