Not logged in. · Lost password · Register
Forum: General Help and Support Development RSS
http code on authorisation error
ishayahu #1
Member since Dec 2018 · 1 post
Group memberships: Members
Show profile · Link to this post
Subject: http code on authorisation error
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:
                self.logger.error("Login failed")

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?
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2020-04-08, 18:42:36 (UTC +02:00)