This commit is contained in:
Kovid Goyal 2016-05-13 20:37:58 +05:30
parent ac2f93115a
commit 71b9d4aa22

View File

@ -922,7 +922,7 @@ class BasicNewsRecipe(Recipe):
def _postprocess_html(self, soup, first_fetch, job_info): def _postprocess_html(self, soup, first_fetch, job_info):
if self.no_stylesheets: if self.no_stylesheets:
for link in soup.findAll('link'): for link in soup.findAll('link'):
if (link.get('type') or '').lower() == 'text/css' and (link.get('rel') or '').lower() == 'stylesheet': if (link.get('type') or 'text/css').lower() == 'text/css' and (link.get('rel') or 'stylesheet').lower() == 'stylesheet':
link.extract() link.extract()
for style in soup.findAll('style'): for style in soup.findAll('style'):
style.extract() style.extract()