mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-05 01:13:37 +02:00
update the if condition to check successful login
due to i18n, the text "Sign Out" might not appear in the returned html. The <i>a<i> tag for logging out: ``` <a href="https://accounts.wsj.com/logout?target=">登出</a> ```
This commit is contained in:
parent
997595dfd4
commit
4293baf36c
1 changed files with 1 additions and 1 deletions
|
|
@ -148,7 +148,7 @@ def get_browser(self, *a, **kw):
|
|||
self.log('Performing login callback...')
|
||||
res = br.submit()
|
||||
self.wsj_itp_page = raw = res.read()
|
||||
if b'>Sign Out<' not in raw:
|
||||
if b'logout' not in raw:
|
||||
raise ValueError(
|
||||
'Failed to login (callback URL failed), check username and password')
|
||||
return br
|
||||
|
|
|
|||
Loading…
Reference in a new issue