diff --git a/recipes/indian_express.recipe b/recipes/indian_express.recipe index 80a5840517..8da1db2a10 100644 --- a/recipes/indian_express.recipe +++ b/recipes/indian_express.recipe @@ -13,8 +13,10 @@ class IndianExpress(BasicNewsRecipe): #remove_tags_after = dict(name='td', attrs={'class':'newptool1'}) remove_tags = [ dict(name='iframe'), - dict(name='div', attrs={'class':['bookmarks_div', 'comment_box', 'bookmarks_div_bot', 'box']}), - dict(name='div', attrs={'id':['footer', 'tab_innerhc', 'discussion', 'google_new']}), + dict(name='div', attrs={'class':['pagination_new', 'comments_desc', + 'content_right', 'bookmarks_div', 'comment_box', 'bookmarks_div_bot', 'box']}), + dict(name='div', attrs={'id':['footer', 'tab_innerhc', 'discussion', + 'google_new', 'header_new', 'slidebox']}), dict(name='a', attrs={'class':'nobdr'}), #dict(name='span', text=':'), ] diff --git a/src/calibre/ebooks/oeb/transforms/flatcss.py b/src/calibre/ebooks/oeb/transforms/flatcss.py index 6633651a82..10b7e259ac 100644 --- a/src/calibre/ebooks/oeb/transforms/flatcss.py +++ b/src/calibre/ebooks/oeb/transforms/flatcss.py @@ -8,6 +8,7 @@ __copyright__ = '2008, Marshall T. Vandegrift ' import re, operator, math from collections import defaultdict +from xml.dom import SyntaxErr from lxml import etree import cssutils @@ -279,7 +280,7 @@ class CSSFlattener(object): if 'color' in node.attrib: try: cssdict['color'] = Property('color', node.attrib['color']).value - except ValueError: + except (ValueError, SyntaxErr): pass del node.attrib['color'] if 'bgcolor' in node.attrib: