diff --git a/recipes/hbr.recipe b/recipes/hbr.recipe index 4f3df329b8..9b1e132f7c 100644 --- a/recipes/hbr.recipe +++ b/recipes/hbr.recipe @@ -34,12 +34,14 @@ class HBR(BasicNewsRecipe): rq = Request('https://hbr.org/authenticate', headers={ 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8', 'Referer': 'https://hbr.org/sign-in', + 'Origin': 'https://hbr.org', 'X-Requested-With': 'XMLHttpRequest', + 'Accept': 'application/json, text/javascript, */*; q=0.01', }, data=urlencode({'username': self.username, 'password': self.password})) r = br.open(rq) raw = r.read() data = json.loads(raw) - if data['code'] != 200 or data["message"] != "Authentication Successful": + if data['code'] != 200 or data["message"] != "Authentication Successful.": raise ValueError('Failed to log in check username/password') return br