valhallasw added a comment.
> Well, you cannot get an valid crsf token from an invalid oauth token.
In that case, I would expect an error 'Can't retrieve CSRF token, API returned
...' rather than a badtoken error -- or more specifically: I would expect a
`mwoauth-invalid-authorization` error response, which would
raise NoUsername('Failed OAuth authentication for %s: %s'
% (self.site, info))
Can you run your script with -debug? That should create a log file in logs/
that shows the exact API requests made, and their response.
TASK DETAIL
https://phabricator.wikimedia.org/T125779
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: valhallasw
Cc: Matanya, valhallasw, Ricordisamoa, Aklapper, Yann, StudiesWorld,
pywikibot-bugs-list, zhuyifei1999
_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs