This commit is contained in:
Kovid Goyal 2016-11-09 08:06:02 +05:30
parent f9931d792a
commit eec0ebd6ec

View File

@ -408,13 +408,13 @@ class NYTimes(BasicNewsRecipe):
def get_browser(self): def get_browser(self):
br = BasicNewsRecipe.get_browser(self) br = BasicNewsRecipe.get_browser(self)
if self.username is not None and self.password is not None: if self.username is not None and self.password is not None:
br.open('http://www.nytimes.com/auth/login') br.open('https://www.nytimes.com/auth/login')
br.form = br.forms().next() br.form = br.forms().next()
br['userid'] = self.username br['userid'] = self.username
br['password'] = self.password br['password'] = self.password
raw = br.submit().read() br.submit().read()
if 'Please try again' in raw: # if 'Please try again' in raw:
raise Exception('Your username and password are incorrect') # raise Exception('Your username and password are incorrect')
return br return br
cover_tag = 'NY_NYT' cover_tag = 'NY_NYT'