fixing captcha
This commit is contained in:
parent
50dc78f95b
commit
85cbefaca4
1 changed files with 1 additions and 1 deletions
|
|
@ -62,7 +62,7 @@ class LoginPage(Page):
|
|||
self.browser.controls.append(ClientForm.TextControl('text', 'ads_token_js', {'value': ''}))
|
||||
|
||||
code = ''.join(self.document.xpath('//script[contains(text(), "autosubmit")]/text()'))
|
||||
code = re.sub('if \(autosubmit.*', '', code)
|
||||
code = re.search('(function .*)try', code).group(1)
|
||||
js = Javascript(code)
|
||||
func_name = re.search(r'function (\w+)\(e\)', code).group(1)
|
||||
self.browser['ads_token_js'] = str(js.call(func_name, self.browser['ads_token']))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue