I'm developing now a system to backup and testing backup of DokuWiki. For that, I'm running spider scrapy to get content of all pages and compute it's md5s. And the question is: how I can check authorization error?
In scrapy tutorial it is something like that:
# check login succeed before going on
if b"authentication failed" in response.body:
but checking for that text is a bad idea: it could be in DokuWiki page. So better way is sending the corresponding HTTP code. Can I setup wiki to send that code instead of 200?