mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 14:14:31 +02:00
Fix Newsweek recipe and Implement #2975 (Validation for i/o filenames in ebook-convert)
This commit is contained in:
parent
3f9af83513
commit
2c25153079
2 changed files with 3 additions and 0 deletions
|
|
@ -53,6 +53,8 @@ def __init__(self, input, output, log, report_progress=DummyReporter(), dummy=Fa
|
|||
'''
|
||||
self.input = os.path.abspath(input)
|
||||
self.output = os.path.abspath(output)
|
||||
if self.input == self.output:
|
||||
raise ValueError('Input file is the same as the output file')
|
||||
self.log = log
|
||||
self.ui_reporter = report_progress
|
||||
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ class Newsweek(BasicNewsRecipe):
|
|||
remove_tags = [
|
||||
{'class':['fwArticle noHr','fwArticle','subinfo','hdlBulletItem','head-content','navbar','link', 'ad', 'sponsorLinksArticle', 'mm-content',
|
||||
'inline-social-links-wrapper', 'email-article',
|
||||
'inlineComponentRight',
|
||||
'comments-and-social-links-wrapper', 'EmailArticleBlock']},
|
||||
{'id' : ['footer', 'ticker-data', 'topTenVertical',
|
||||
'digg-top-five', 'mesothorax', 'nw-comments',
|
||||
|
|
|
|||
Loading…
Reference in a new issue