mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-29 00:16:19 +01:00
Fix NYTimes login page change
This commit is contained in:
parent
8c2697c90b
commit
825a3f984b
2 changed files with 6 additions and 6 deletions
|
|
@ -282,9 +282,9 @@ def get_browser(self):
|
|||
br = BasicNewsRecipe.get_browser()
|
||||
if self.username is not None and self.password is not None:
|
||||
br.open('http://www.nytimes.com/auth/login')
|
||||
br.select_form(name='login')
|
||||
br['USERID'] = self.username
|
||||
br['PASSWORD'] = self.password
|
||||
br.form = br.forms().next()
|
||||
br['userid'] = self.username
|
||||
br['password'] = self.password
|
||||
raw = br.submit().read()
|
||||
if 'Please try again' in raw:
|
||||
raise Exception('Your username and password are incorrect')
|
||||
|
|
|
|||
|
|
@ -282,9 +282,9 @@ def get_browser(self):
|
|||
br = BasicNewsRecipe.get_browser()
|
||||
if self.username is not None and self.password is not None:
|
||||
br.open('http://www.nytimes.com/auth/login')
|
||||
br.select_form(name='login')
|
||||
br['USERID'] = self.username
|
||||
br['PASSWORD'] = self.password
|
||||
br.form = br.forms().next()
|
||||
br['userid'] = self.username
|
||||
br['password'] = self.password
|
||||
raw = br.submit().read()
|
||||
if 'Please try again' in raw:
|
||||
raise Exception('Your username and password are incorrect')
|
||||
|
|
|
|||
Loading…
Reference in a new issue