From 4293baf36c6e769c2a1b0c1ac48949bfce9be62d Mon Sep 17 00:00:00 2001 From: Warren Date: Wed, 18 Sep 2019 10:44:26 +0800 Subject: [PATCH] update the if condition to check successful login MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit due to i18n, the text "Sign Out" might not appear in the returned html. The a tag for logging out: ``` 登出 ``` --- recipes/wsj.recipe | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/wsj.recipe b/recipes/wsj.recipe index 5e8e6adefc..e6fc4c6a42 100644 --- a/recipes/wsj.recipe +++ b/recipes/wsj.recipe @@ -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