mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-02-24 09:13:27 +01:00
parent
c90a748839
commit
ff78450ee7
2 changed files with 10 additions and 0 deletions
|
|
@ -120,6 +120,11 @@ def preprocess_html(self, soup):
|
|||
t = soup.find(**classes('dateline'))
|
||||
if t is not None:
|
||||
t.insert(0, ' ')
|
||||
|
||||
# Remove empty li tags
|
||||
for li in soup.findAll('li', attrs={'class': lambda x: x and x.startswith('css-')}):
|
||||
if not li.contents and not li.string:
|
||||
li.extract()
|
||||
return soup
|
||||
|
||||
def read_nyt_metadata(self):
|
||||
|
|
|
|||
|
|
@ -120,6 +120,11 @@ def preprocess_html(self, soup):
|
|||
t = soup.find(**classes('dateline'))
|
||||
if t is not None:
|
||||
t.insert(0, ' ')
|
||||
|
||||
# Remove empty li tags
|
||||
for li in soup.findAll('li', attrs={'class': lambda x: x and x.startswith('css-')}):
|
||||
if not li.contents and not li.string:
|
||||
li.extract()
|
||||
return soup
|
||||
|
||||
def read_nyt_metadata(self):
|
||||
|
|
|
|||
Loading…
Reference in a new issue