Fix WSJ recipe

This commit is contained in:
Kovid Goyal 2008-11-12 11:55:48 -08:00
parent 5423801c2e
commit 3cf7c5f572
3 changed files with 4 additions and 4 deletions

View File

@ -111,7 +111,7 @@ def get_metadata(stream, stream_type='lrf', use_libprs_metadata=False):
return base
def get_comic_cover(stream, type):
extract_first = zip_extract_first if type == 'zip' else rar_extract_first
extract_first = zip_extract_first if type.lower() == 'cbz' else rar_extract_first
ret = extract_first(stream)
if ret is not None:
path, data = ret

View File

@ -42,7 +42,7 @@ def extract(filename, dir):
"""
zf = zipfile.ZipFile( filename )
zf.extractall(dir)
def extract_member(filename, match=re.compile(r'\.(jpg|jpeg|gif|png)\s*$', re.I)):
zf = zipfile.ZipFile(filename)
names = zf.namelist()

View File

@ -27,8 +27,8 @@ class WallStreetJournal(BasicNewsRecipe):
def get_browser(self):
br = BasicNewsRecipe.get_browser()
if self.username is not None and self.password is not None:
br.open('http://online.wsj.com/login')
br.select_form(name='login_form')
br.open('http://commerce.wsj.com/auth/login')
br.select_form(nr=0)
br['user'] = self.username
br['password'] = self.password
br.submit()