[Mediawiki-l] writing robots
Platonides
Platonides at gmail.com
Fri May 25 22:33:27 UTC 2007
Hiram Clawson wrote:
> Good Afternoon MediaWiki Fans:
>
> Before I pull all of my hair out here, can anyone tell me what I am missing in this procedure.
> Am I following out of date documents here or what ?
>
> I'm trying to write a robot to automatically add pages to a MediaWiki. Something along the lines of:
> http://meta.wikimedia.org/wiki/MediaWiki_Bulk_Page_Creator
>
> I've been following the proper use of the save edit parameters at:
> http://www.mediawiki.org/wiki/Manual:Parameters_to_index.php
>
> And sending the appropriate POST request to the wiki with a valid wpEditToken
> obtained from the wiki with an action=edit call first. I'm watching my POST
> operation go out OK from my end, but the only answer I get back from
> the wiki is "this page does not exist, would you like to edit it"
>
> Is it clear to the wiki when it sees an incoming POST request with the URL action=submit:
> index.php?title=myNewPage&action=submit
> That this is the result of the submit button "Save page" from the editform on the edit page ?
> Is it just the actual POST variables in the message that direct the save activity at
> the wiki ?
>
> Anyone have any good pointers to recent documents about robot writing ?
>
> My hair will appreciate your assistance,
>
> --Hiram
Try setting an wpSave parameter too (value doesn't matter). Mediawiki
needs to know if it's a Save, a Preview...
Plus, if you provide no content to the page (blank wpTextbox1) it won't
get created, arriving to that page.
I recommend when you have this knid of problems, to sniff your broswser
connection to copy its behaviour.
More information about the MediaWiki-l
mailing list