Update New York Review of Books

This commit is contained in:
Kovid Goyal 2014-01-05 08:59:18 +05:30
parent e5939d3d3d
commit 47a9bbda79
2 changed files with 32 additions and 30 deletions

View File

@ -74,8 +74,9 @@ class NewYorkReviewOfBooks(BasicNewsRecipe):
self.log('Issue date:', date)
# Find TOC
toc = soup.find('div', attrs={'class':'current_issue'}).find('div', attrs={'class':'articles_list'})
tocs = soup.find('div', attrs={'class':'current_issue'}).findAll('div', attrs={'class':'articles_list'})
articles = []
for toc in tocs:
for div in toc.findAll('div', attrs={'class':'row'}):
h2 = div.find('h2')
title = self.tag_to_string(h2).strip()

View File

@ -64,8 +64,9 @@ class NewYorkReviewOfBooks(BasicNewsRecipe):
self.log('Issue date:', date)
# Find TOC
toc = soup.find('div', attrs={'class':'current_issue'}).find('div', attrs={'class':'articles_list'})
tocs = soup.find('div', attrs={'class':'current_issue'}).findAll('div', attrs={'class':'articles_list'})
articles = []
for toc in tocs:
for div in toc.findAll('div', attrs={'class':'row'}):
h2 = div.find('h2')
title = self.tag_to_string(h2).strip()