mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
f9931d792a
commit
eec0ebd6ec
@ -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'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user