mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix Newsweek recipe and Implement #2975 (Validation for i/o filenames in ebook-convert)
This commit is contained in:
parent
3f9af83513
commit
2c25153079
@ -53,6 +53,8 @@ class Plumber(object):
|
|||||||
'''
|
'''
|
||||||
self.input = os.path.abspath(input)
|
self.input = os.path.abspath(input)
|
||||||
self.output = os.path.abspath(output)
|
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.log = log
|
||||||
self.ui_reporter = report_progress
|
self.ui_reporter = report_progress
|
||||||
|
|
||||||
|
@ -30,6 +30,7 @@ class Newsweek(BasicNewsRecipe):
|
|||||||
remove_tags = [
|
remove_tags = [
|
||||||
{'class':['fwArticle noHr','fwArticle','subinfo','hdlBulletItem','head-content','navbar','link', 'ad', 'sponsorLinksArticle', 'mm-content',
|
{'class':['fwArticle noHr','fwArticle','subinfo','hdlBulletItem','head-content','navbar','link', 'ad', 'sponsorLinksArticle', 'mm-content',
|
||||||
'inline-social-links-wrapper', 'email-article',
|
'inline-social-links-wrapper', 'email-article',
|
||||||
|
'inlineComponentRight',
|
||||||
'comments-and-social-links-wrapper', 'EmailArticleBlock']},
|
'comments-and-social-links-wrapper', 'EmailArticleBlock']},
|
||||||
{'id' : ['footer', 'ticker-data', 'topTenVertical',
|
{'id' : ['footer', 'ticker-data', 'topTenVertical',
|
||||||
'digg-top-five', 'mesothorax', 'nw-comments',
|
'digg-top-five', 'mesothorax', 'nw-comments',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user