News download: Remove all <iframe> tags by default as the iPad can't handle them

This commit is contained in:
Kovid Goyal 2010-04-06 22:55:51 +05:30
parent 282aa58029
commit 2ee2c64e9e
2 changed files with 2 additions and 9 deletions

View File

@ -23,14 +23,6 @@ class NewYorker(BasicNewsRecipe):
category = 'news, politics, USA'
encoding = 'cp1252'
html2lrf_options = [
'--comment', description
, '--category', category
, '--publisher', publisher
]
html2epub_options = 'publisher="' + publisher + '"\ncomments="' + description + '"\ntags="' + category + '"'
keep_only_tags = [dict(name='div', attrs={'id':'printbody'})]
remove_tags_after = dict(name='div',attrs={'id':'articlebody'})
remove_tags = [

View File

@ -621,8 +621,9 @@ class BasicNewsRecipe(Recipe):
for attr in self.remove_attributes:
for x in soup.findAll(attrs={attr:True}):
del x[attr]
for base in list(soup.findAll('base')):
for base in list(soup.findAll(['base', 'iframe'])):
base.extract()
return self.postprocess_html(soup, first_fetch)