Update NYTimes Cooking

This commit is contained in:
Kovid Goyal 2022-09-12 08:18:21 +05:30
parent 181a94fa7f
commit 470a7a3af7
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
# vim:fileencoding=utf-8
from calibre.web.feeds.news import BasicNewsRecipe, classes
from calibre.web.feeds.news import BasicNewsRecipe, prefixed_classes
class NYTCooking(BasicNewsRecipe):
@ -11,11 +11,15 @@ class NYTCooking(BasicNewsRecipe):
encoding = 'utf-8'
oldest_article = 2
max_articles_per_feed = 30
remove_attributes = ['style']
no_stylesheets = True
keep_only_tags = [
classes('recipe-title recipe-subhead recipe-intro recipe-instructions')
prefixed_classes('pagecontent_recipe-wrap__'),
]
remove_tags = [
classes('recipe-details-share'),
prefixed_classes(
'adunit_ad-unit__ recipeintro_tools-block__ notessection_notesPrintLayout__ notessection_notesSection__'
' ratingssection_ratingsSection__ ingredients_buttons__'),
dict(name='source'),
]