mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-28 08:55:51 +01:00
Log failed login URL
This commit is contained in:
parent
f24541f37a
commit
6e02b9f8c1
1 changed files with 5 additions and 1 deletions
|
|
@ -147,7 +147,11 @@ def get_browser(self):
|
|||
raise ValueError(
|
||||
'Failed to login (XHR failed), check username and password')
|
||||
br.set_cookie('m', data['username'], '.wsj.com')
|
||||
r = br.open(data['url'])
|
||||
try:
|
||||
r = br.open(data['url'])
|
||||
except Exception:
|
||||
self.log.error('Failed to open login url: {}'.format(data['url']))
|
||||
raise
|
||||
self.wsj_itp_page = raw = r.read()
|
||||
if b'>Sign Out<' not in raw:
|
||||
raise ValueError(
|
||||
|
|
|
|||
Loading…
Reference in a new issue