Xqt added a comment.
> should be changed to:
>
> login_request[
> self. Keyword('token')] = response['token']
this proposal does not work because no token is given with the response:
{'code': 'badtoken',
'info': 'Invalid CSRF token.',
'other': {'help': 'See https://de.wikipedia.org/w/api.php for API usage. '
'Subscribe to the mediawiki-api-announce mailing list at
'
'<https://lists.wikimedia.org/postorius/lists/mediawiki-api-announce.lists.wikimedia.org/>
'
'for notice of API deprecations and breaking changes.',
'servedby': 'mw1376'},
'unicode': 'badtoken: Invalid CSRF token.\n'
'[servedby: mw1376;\n'
' help: See https://de.wikipedia.org/w/api.php for API usage. '
'Subscribe to the mediawiki-api-announce mailing list at '
'<https://lists.wikimedia.org/postorius/lists/mediawiki-api-announce.lists.wikimedia.org/>
'
'for notice of API deprecations and breaking changes.]'}
The currend code clears the token wallet in line 430. New tokens are loaded
with Site.get_tokens()
<https://doc.wikimedia.org/pywikibot/stable/api_ref/pywikibot.site.html#pywikibot.site._apisite.APISite.get_tokens>
when `self.site.tokens['login']` is used.
@chiefgeek157: Could you give the complete I/O during login for further
investigation please. (Please redact private data).
TASK DETAIL
https://phabricator.wikimedia.org/T328814
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Xqt
Cc: Xqt, Aklapper, chiefgeek157, pywikibot-bugs-list, PotsdamLamb, Jyoo1011,
JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS,
Framawiki, Mdupont, JJMC89, TerraCodes, Dvorapa, Altostratus, Avicennasis,
mys_721tx, jayvdb, Masti, Alchimista
_______________________________________________
pywikibot-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]