mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-02 22:53:11 +02:00
Check for successful login in WSJ recipe
This commit is contained in:
parent
dd0905ad3f
commit
ce5c3e3951
1 changed files with 5 additions and 1 deletions
|
|
@ -50,7 +50,11 @@ def get_browser(self):
|
|||
br.select_form(nr=0)
|
||||
br['user'] = self.username
|
||||
br['password'] = self.password
|
||||
br.submit()
|
||||
res = br.submit()
|
||||
raw = res.read()
|
||||
if 'Welcome,' not in raw:
|
||||
raise ValueError('Failed to log in to wsj.com, check your '
|
||||
'username and password')
|
||||
return br
|
||||
|
||||
def postprocess_html(self, soup, first):
|
||||
|
|
|
|||
Loading…
Reference in a new issue