Update The Hindu

This commit is contained in:
Kovid Goyal 2017-01-13 17:39:16 +05:30
parent 02e1c594d6
commit 6011d45ef3

View File

@ -22,7 +22,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_1'}) div = soup.find('section', attrs={'id': 'section_'})
if div is None: if div is None:
return ans return ans
ul = div.find('ul', attrs={'class': 'archive-list'}) ul = div.find('ul', attrs={'class': 'archive-list'})
@ -48,8 +48,7 @@ class TheHindu(BasicNewsRecipe):
if self.is_accepted_entry(x): if self.is_accepted_entry(x):
section_list.append( section_list.append(
(string.capwords(self.tag_to_string(x)), x['href'])) (string.capwords(self.tag_to_string(x)), x['href']))
self.log('Found section:', 'Front page') feeds = []
feeds = [('Front Page', self.articles_from_soup(soup))]
# For each section title, fetch the article urls # For each section title, fetch the article urls
for section in section_list: for section in section_list: