Update The Hindu

This commit is contained in:
Kovid Goyal 2022-02-13 12:07:58 +05:30
parent a968848316
commit 46f9b1ebd7
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -55,6 +55,8 @@ class TheHindu(BasicNewsRecipe):
source.extract() source.extract()
except Exception: except Exception:
pass pass
for img in soup.findAll(attrs={'data-original': True}):
img['src'] = img['data-original']
# Place intro beneath the title, skip duplicates # Place intro beneath the title, skip duplicates
try: try:
soup.h1.insert_after(soup.find('h2', attrs={'class': 'intro'})) soup.h1.insert_after(soup.find('h2', attrs={'class': 'intro'}))
@ -77,7 +79,7 @@ class TheHindu(BasicNewsRecipe):
def articles_from_soup(self, soup): def articles_from_soup(self, soup):
ans = [] ans = []
div = soup.find('section', attrs={'id': 'section_'}) div = soup.find('section', attrs={'id': 'section_1'})
if div is None: if div is None:
return ans return ans
for ul in div.findAll('ul', attrs={'class': 'archive-list'}): for ul in div.findAll('ul', attrs={'class': 'archive-list'}):