mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
7da08cfbd3
commit
905e755fcc
@ -79,11 +79,11 @@ class Barrons(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'], '.barrons.com')
|
br.set_cookie('m', data['username'], '.barrons.com')
|
||||||
raw = br.open(data['url']).read()
|
br.open(data['url']).read()
|
||||||
# open('/t/raw.html', 'wb').write(raw)
|
# open('/t/raw.html', 'wb').write(raw)
|
||||||
if b'>Logout<' not in raw:
|
# if b'>Logout<' not in raw:
|
||||||
raise ValueError(
|
# raise ValueError(
|
||||||
'Failed to login (auth URL failed), check username and password')
|
# 'Failed to login (auth URL failed), check username and password')
|
||||||
return br
|
return br
|
||||||
|
|
||||||
# Use the print version of a page when available.
|
# Use the print version of a page when available.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user