On Thu, Sep 26, 2013 at 5:58 PM, Andreas Mrvka <[email protected]> wrote: > > wget --http-user=myuser --http-password=mypwd > "https://localhost/wiki/api.php?action=query&prop=info|revisions&intoken=edit&titles=mynewpage&format=xml > [...] > > 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"
Besides percent-encoding the edit token, you also need to pass back 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 [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
