Update New York Times Book Review

This commit is contained in:
Kovid Goyal 2016-02-14 09:44:15 +05:30
parent 0255bce10d
commit 0398ecd9d3

View File

@ -38,6 +38,8 @@ class NewYorkTimesBookReview(BasicNewsRecipe):
self.log('\t', desc) self.log('\t', desc)
for li in soup.find(id='latest-panel').find('ol').findAll('li'): for li in soup.find(id='latest-panel').find('ol').findAll('li'):
a = li.find('a', attrs={'class':'story-link'}, href=True) a = li.find('a', attrs={'class':'story-link'}, href=True)
if a is None:
continue
url = a['href'] url = a['href']
m = a.find(attrs={'class':'story-meta'}) m = a.find(attrs={'class':'story-meta'})
title = self.tag_to_string(m.find('h2')) title = self.tag_to_string(m.find('h2'))