mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04: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
@ -148,7 +148,7 @@ class WSJ(BasicNewsRecipe):
|
|||||||
self.log('Performing login callback...')
|
self.log('Performing login callback...')
|
||||||
res = br.submit()
|
res = br.submit()
|
||||||
self.wsj_itp_page = raw = res.read()
|
self.wsj_itp_page = raw = res.read()
|
||||||
if b'>Sign Out<' not in raw:
|
if b'logout' not in raw:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
'Failed to login (callback URL failed), check username and password')
|
'Failed to login (callback URL failed), check username and password')
|
||||||
return br
|
return br
|
||||||
|
Loading…
x
Reference in New Issue
Block a user