Revision: 5491 Author: nicdumz Date: 2008-06-01 14:10:36 +0000 (Sun, 01 Jun 2008)
Log Message: ----------- when using the api_login, do not send a session cookie with the login request
Modified Paths: -------------- trunk/pywikipedia/login.py
Modified: trunk/pywikipedia/login.py =================================================================== --- trunk/pywikipedia/login.py 2008-06-01 09:39:27 UTC (rev 5490) +++ trunk/pywikipedia/login.py 2008-06-01 14:10:36 UTC (rev 5491) @@ -140,10 +140,13 @@ wikipedia.cj.save(wikipedia.COOKIEFILE) return "Ok" else: - #Retrieve a session cookie - session = self.site.getUrl(login_address, cookie_only=True) + if config.use_api_login: + response, data = self.site.postData(address, self.site.urlEncode(predata)) + else: + #Retrieve a session cookie + session = self.site.getUrl(login_address, cookie_only=True)
- response, data = self.site.postForm(address, predata, cookies=session) + response, data = self.site.postForm(address, predata, cookies=session) Reat=re.compile(': (.*?);') L = []
pywikipedia-l@lists.wikimedia.org