This commit is contained in:
Kovid Goyal 2008-03-29 14:14:52 +00:00
parent f1d875eacb
commit 90b8a74b0d
2 changed files with 5 additions and 2 deletions

View File

@ -171,7 +171,7 @@ def setup_completion(fatal_errors):
f.write(opts_and_exts('mobi2lrf', htmlop, ['mobi', 'prc']))
f.write(opts_and_exts('pdf2lrf', htmlop, ['pdf']))
f.write(opts_and_exts('any2lrf', htmlop,
['epub', 'htm', 'html', 'xhtml', 'xhtm', 'rar', 'zip', 'txt', 'lit', 'rtf', 'pdf']))
['epub', 'htm', 'html', 'xhtml', 'xhtm', 'rar', 'zip', 'txt', 'lit', 'rtf', 'pdf', 'prc', 'mobi']))
f.write(opts_and_exts('lrf2lrs', lrf2lrsop, ['lrf']))
f.write(opts_and_exts('lrf-meta', metaop, ['lrf']))
f.write(opts_and_exts('rtf-meta', metaop, ['rtf']))

View File

@ -59,7 +59,10 @@ class Newsweek(BasicNewsRecipe):
def parse_index(self):
soup = self.index_to_soup(self.get_current_issue())
ci = self.get_current_issue()
if not ci:
raise RuntimeError('Unable to connect to newsweek.com. Try again later.')
soup = self.index_to_soup(ci)
img = soup.find(alt='Cover')
if img is not None and img.has_key('src'):
small = img['src']