This commit is contained in:
Kovid Goyal 2017-08-19 09:49:41 +05:30
parent 7da08cfbd3
commit 905e755fcc
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -79,11 +79,11 @@ class Barrons(BasicNewsRecipe):
raise ValueError(
'Failed to login (XHR failed), check username and password')
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)
if b'>Logout<' not in raw:
raise ValueError(
'Failed to login (auth URL failed), check username and password')
# if b'>Logout<' not in raw:
# raise ValueError(
# 'Failed to login (auth URL failed), check username and password')
return br
# Use the print version of a page when available.