mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Check for successful login in WSJ recipe
This commit is contained in:
parent
dd0905ad3f
commit
ce5c3e3951
@ -50,7 +50,11 @@ class WallStreetJournal(BasicNewsRecipe):
|
|||||||
br.select_form(nr=0)
|
br.select_form(nr=0)
|
||||||
br['user'] = self.username
|
br['user'] = self.username
|
||||||
br['password'] = self.password
|
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
|
return br
|
||||||
|
|
||||||
def postprocess_html(self, soup, first):
|
def postprocess_html(self, soup, first):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user