Update New York Times Book Review

This commit is contained in:
Kovid Goyal 2014-02-01 19:36:52 +05:30
parent b37a78fd89
commit 4d89815a6e

View File

@ -1,20 +1,19 @@
from calibre.web.feeds.news import BasicNewsRecipe
class NewYorkTimesBookReview(BasicNewsRecipe):
title = u'New York Times Book Review'
language = 'en'
description = 'The New York Times Sunday Book Review. Best downloaded on Fridays to avoid the ads that the New York Times shows of the first few days of the week.'
description = 'The New York Times Sunday Book Review. Best downloaded on Fridays to avoid the ads that the New York Times shows of the first few days of the week.' # noqa
__author__ = 'Kovid Goyal'
no_stylesheets = True
no_javascript = True
keep_only_tags = [dict(id='article'), dict(id=lambda x:x and x.startswith('entry-'))]
remove_tags = [
dict(attrs={'class':['articleBottomExtra', 'shareToolsBox', 'singleAd']}),
dict(attrs={'class':lambda x: x and ('shareTools' in x or 'enlargeThis' in x)}),
]
auto_cleanup = True
#keep_only_tags = [dict(id='article'), dict(id=lambda x:x and x.startswith('entry-'))]
# remove_tags = [
#dict(attrs={'class':['articleBottomExtra', 'shareToolsBox', 'singleAd']}),
#dict(attrs={'class':lambda x: x and ('shareTools' in x or 'enlargeThis' in x)}),
#]
def parse_index(self):
soup = self.index_to_soup('http://www.nytimes.com/pages/books/review/index.html')