From 3a4acd5826e3f5ee4c50f506ba45e6d515215fb1 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Sun, 19 May 2019 18:12:43 -0400 Subject: [PATCH] py3: fix regression in commit 96a8aeaaf5420dcdbb3cbeb1856a4985e8942395 Strings that contain non-ascii literal characters cannot be made into bytestrings merely by adding b'' and must either be encoded or use hex escapes. --- recipes/insider.recipe | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/insider.recipe b/recipes/insider.recipe index 4bfe0511cc..192fec9bea 100644 --- a/recipes/insider.recipe +++ b/recipes/insider.recipe @@ -29,7 +29,7 @@ class insider(BasicNewsRecipe): br['login-password'] = self.password res = br.submit() raw = res.read() - if b'Odhlásit se' not in raw: + if 'Odhlásit se'.encode('utf-8') not in raw: raise ValueError('Failed to login to insider.cz' 'Check your username and password.') return br