From 470a7a3af7c816437ad9d9f4186bf8693d6598db Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 12 Sep 2022 08:18:21 +0530 Subject: [PATCH] Update NYTimes Cooking --- recipes/nytimes_cooking.recipe | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/recipes/nytimes_cooking.recipe b/recipes/nytimes_cooking.recipe index e780f57a0f..dc466d246c 100644 --- a/recipes/nytimes_cooking.recipe +++ b/recipes/nytimes_cooking.recipe @@ -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'), ]