http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10507
Revision: 10507 Author: xqt Date: 2012-08-30 19:55:20 +0000 (Thu, 30 Aug 2012) Log Message: ----------- Fetch token before watching pages, pathc submitted by legoktm, thanks. (bug #3559202)
Modified Paths: -------------- branches/rewrite/pywikibot/site.py
Modified: branches/rewrite/pywikibot/site.py =================================================================== --- branches/rewrite/pywikibot/site.py 2012-08-27 13:31:57 UTC (rev 10506) +++ branches/rewrite/pywikibot/site.py 2012-08-30 19:55:20 UTC (rev 10507) @@ -2760,7 +2760,8 @@ @return: True if API returned expected response; False otherwise
""" - req = api.Request(action="watch", title=page.title(withSection=False)) + token = self.token(page, "watch") + req = api.Request(action="watch", token=token, title=page.title(withSection=False)) if unwatch: req["unwatch"] = "" result = req.submit()
pywikipedia-svn@lists.wikimedia.org