mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
IGN: Nytimes recipe now throws a useful error when login fails
This commit is contained in:
parent
30e0be1170
commit
799fb6645b
@ -35,7 +35,10 @@ class NYTimes(BasicNewsRecipe):
|
||||
br.select_form(name='login')
|
||||
br['USERID'] = self.username
|
||||
br['PASSWORD'] = self.password
|
||||
br.submit()
|
||||
raw = br.submit().read()
|
||||
if 'Sorry, we could not find the combination you entered. Please try again.' in raw:
|
||||
raise Exception('Your username and password are incorrect')
|
||||
#open('/t/log.html', 'wb').write(raw)
|
||||
return br
|
||||
|
||||
def parse_index(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user