This commit is contained in:
Kovid Goyal 2024-05-02 13:04:55 +05:30
commit 971d346cc1
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
4 changed files with 7 additions and 2 deletions

View File

@ -146,6 +146,9 @@ class ft(BasicNewsRecipe):
return html
def preprocess_html(self, soup):
p = soup.find(**classes('o-topper__standfirst'))
if p:
p.name = 'p'
for table in soup.findAll('table'):
if len(table.find('tbody').findAll('tr')) > 20:
table.find('tbody').decompose()

View File

@ -76,7 +76,9 @@ class MitTechnologyReview(BasicNewsRecipe):
soup = self.index_to_soup(self.INDEX)
issue = soup.find(attrs={'class':lambda x: x and x.startswith('magazineHero__title')})
time = soup.find(attrs={'class': lambda x: x and x.startswith('magazineHero__date')})
desc = soup.find(attrs={'class': lambda x: x and x.startswith('magazineHero__description')})
self.title = 'MIT Tech Review ' + self.tag_to_string(issue)
self.description = self.tag_to_string(desc)
self.timefmt = ' [' + self.tag_to_string(time) + ']'
self.log('Downloading issue: ', self.timefmt)

View File

@ -65,7 +65,7 @@ class TheWeek(BasicNewsRecipe):
]
remove_tags = [
dict(name='aside'),
dict(name=['aside', 'source']),
classes(
'blueconic-article__wrapper ad-unit van_vid_carousel tag-links'
)

View File

@ -65,7 +65,7 @@ class TheWeek(BasicNewsRecipe):
]
remove_tags = [
dict(name='aside'),
dict(name=['aside', 'source']),
classes(
'blueconic-article__wrapper ad-unit van_vid_carousel tag-links'
)