correctly get token only when available
This commit is contained in:
parent
774c0fd8f0
commit
be43326ec5
2 changed files with 12 additions and 4 deletions
|
|
@ -61,6 +61,13 @@ class BasePage(_BasePage):
|
|||
def get_token(self):
|
||||
return self.parser.select(self.document.getroot(), '//form//input[@name="token"]', 1, 'xpath').attrib['value']
|
||||
|
||||
def on_loaded(self):
|
||||
if not self.is_error():
|
||||
self.browser.token = self.get_token()
|
||||
|
||||
def is_error(self):
|
||||
return False
|
||||
|
||||
def build_token(self, token):
|
||||
"""
|
||||
These fucking faggots have introduced a new protection on the token.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue