Hello Brad, thank you for your fast response! I extended my script with your additions and it works now! :-)
I also tried the save/load cookies before but.... --keep-session-cookies was the showstopper! With this setting it works! Thanks Andreas 2013/9/27 Brad Jorsch (Anomie) <[email protected]> > 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 >
_______________________________________________ Mediawiki-api mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
