On Thu, Mar 3, 2011 at 5:44 AM, <richardcavell(a)mail.com> wrote:
Hi all.
I'm coding a Wikipedia bot framework (not using any existing framework)
for use on en-wiki. I'm a little confused by the documentation of edit
tokens. Which is the correct approach:
1. My bot obtains an edit token using the Main page as a nominal
title, saves the edit token and then uses it in every subsequent
attempt to edit.
or
2. My bot queries each page to obtain an edit token before attempting
to edit.
Number 1. An edit token remains the same during a single session, so
there is no need to request a page just for the edit token, at least
not to do it more than once. You might add code to change the edit
token every time you happen to request a page that contains one.
--
André Engels, andreengels(a)gmail.com