On Sat, Jul 24, 2010 at 12:07:51PM -0300, Mike.lifeguard wrote:
The only CentralAuth cookies I'm getting from the 2nd response referred to at [0] has domain=.wikipedia.org, so the bot will be logged in on all wikipedia domains. However, this doesn't work for non-wikipedia projects.
The api on .wikipedia.org cannot set cookies on .wikimedia.org or other domains. In the normal login form, those cookies get set by the little icons for each project that are displayed on the login form.
How should I get a cookie for those domains as well?
I don't know whether it would work to just fake up identical cookies for the other domains, you could try it and find out. Or you might be able to use Special:AutoLogin in the same way the little icons do. But the easiest way would probably be to just do the API login on the other wiki to get the cookies in the normal manner. For humans it's annoying to have to put in your username and password multiple times, but for a bot it shouldn't be a big deal.