mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 16:13:38 +02:00
Workaround for broken XHTML in some Washington Post articles
This commit is contained in:
parent
bb11c80871
commit
a5f13fa593
1 changed files with 7 additions and 0 deletions
|
|
@ -46,3 +46,10 @@ def postprocess_html(self, soup, first):
|
||||||
div['style'] = ''
|
div['style'] = ''
|
||||||
return soup
|
return soup
|
||||||
|
|
||||||
|
def preprocess_html(self, soup):
|
||||||
|
for tag in soup.findAll('font'):
|
||||||
|
if tag.has_key('size'):
|
||||||
|
if tag['size'] == '+2':
|
||||||
|
if tag.b:
|
||||||
|
return soup
|
||||||
|
return None
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue