mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -04:00
Update New York Times Book Review
This commit is contained in:
parent
b37a78fd89
commit
4d89815a6e
@ -1,20 +1,19 @@
|
|||||||
|
|
||||||
from calibre.web.feeds.news import BasicNewsRecipe
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
|
||||||
class NewYorkTimesBookReview(BasicNewsRecipe):
|
class NewYorkTimesBookReview(BasicNewsRecipe):
|
||||||
title = u'New York Times Book Review'
|
title = u'New York Times Book Review'
|
||||||
language = 'en'
|
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'
|
__author__ = 'Kovid Goyal'
|
||||||
|
|
||||||
|
|
||||||
no_stylesheets = True
|
no_stylesheets = True
|
||||||
no_javascript = True
|
no_javascript = True
|
||||||
keep_only_tags = [dict(id='article'), dict(id=lambda x:x and x.startswith('entry-'))]
|
auto_cleanup = True
|
||||||
remove_tags = [
|
#keep_only_tags = [dict(id='article'), dict(id=lambda x:x and x.startswith('entry-'))]
|
||||||
dict(attrs={'class':['articleBottomExtra', 'shareToolsBox', 'singleAd']}),
|
# remove_tags = [
|
||||||
dict(attrs={'class':lambda x: x and ('shareTools' in x or 'enlargeThis' in x)}),
|
#dict(attrs={'class':['articleBottomExtra', 'shareToolsBox', 'singleAd']}),
|
||||||
]
|
#dict(attrs={'class':lambda x: x and ('shareTools' in x or 'enlargeThis' in x)}),
|
||||||
|
#]
|
||||||
|
|
||||||
def parse_index(self):
|
def parse_index(self):
|
||||||
soup = self.index_to_soup('http://www.nytimes.com/pages/books/review/index.html')
|
soup = self.index_to_soup('http://www.nytimes.com/pages/books/review/index.html')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user