mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
parent
c90a748839
commit
ff78450ee7
@ -120,6 +120,11 @@ class NewYorkTimes(BasicNewsRecipe):
|
|||||||
t = soup.find(**classes('dateline'))
|
t = soup.find(**classes('dateline'))
|
||||||
if t is not None:
|
if t is not None:
|
||||||
t.insert(0, ' ')
|
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
|
return soup
|
||||||
|
|
||||||
def read_nyt_metadata(self):
|
def read_nyt_metadata(self):
|
||||||
|
@ -120,6 +120,11 @@ class NewYorkTimes(BasicNewsRecipe):
|
|||||||
t = soup.find(**classes('dateline'))
|
t = soup.find(**classes('dateline'))
|
||||||
if t is not None:
|
if t is not None:
|
||||||
t.insert(0, ' ')
|
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
|
return soup
|
||||||
|
|
||||||
def read_nyt_metadata(self):
|
def read_nyt_metadata(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user