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:
Warren 2019-09-18 10:44:26 +08:00 committed by GitHub
parent 997595dfd4
commit 4293baf36c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -148,7 +148,7 @@ class WSJ(BasicNewsRecipe):
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