mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
Log failed login URL
This commit is contained in:
parent
f24541f37a
commit
6e02b9f8c1
@ -147,7 +147,11 @@ class WSJ(BasicNewsRecipe):
|
|||||||
raise ValueError(
|
raise ValueError(
|
||||||
'Failed to login (XHR failed), check username and password')
|
'Failed to login (XHR failed), check username and password')
|
||||||
br.set_cookie('m', data['username'], '.wsj.com')
|
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()
|
self.wsj_itp_page = raw = r.read()
|
||||||
if b'>Sign Out<' not in raw:
|
if b'>Sign Out<' not in raw:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user