On Thu, Sep 26, 2013 at 5:58 PM, Andreas Mrvka <andreas.mrvka@gmail.com> wrote:[...]
>
> wget --http-user=myuser --http-password=mypwd
> "https://localhost/wiki/api.php?action=query&prop=info|revisions&intoken=edit&titles=mynewpage&format=xml
>
>Besides percent-encoding the edit token, you also need to pass back
> wget --http-user=myuser --http-password=mypwd --header="Content-Type:
> application/x-www-form-urlencoded" "https://localhost/wiki/api.php"
> --post-data "action=edit&title=mynewpage&text=test&token=$newtoken"
the cookies from the first request into the second.
You'll want to give the --keep-session-cookies and --save-cookies
options to the first wget command, and additionally --load-cookies to
the second.
--
Brad Jorsch (Anomie)
Software Engineer
Wikimedia Foundation
_______________________________________________
Mediawiki-api mailing list
Mediawiki-api@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api