From 56cad44079718381342122736610c06c59e700c0 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 12 Aug 2023 07:31:39 +0530 Subject: [PATCH] Update Epoch Times --- recipes/epoch_times.recipe | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/recipes/epoch_times.recipe b/recipes/epoch_times.recipe index 562b5beca7..785f76242d 100644 --- a/recipes/epoch_times.recipe +++ b/recipes/epoch_times.recipe @@ -22,12 +22,13 @@ class EpochTimes(BasicNewsRecipe): .author,.date{font-size: small} """ keep_only_tags = [ - classes('post_title featured_image pricat_name author date post_content'), + classes('post-main'), ] remove_tags = [ - classes('author_wrapper bottom_row'), + classes('print:hidden h-header'), + dict(name='button'), ] - + # # feeds can be found at https://www.theepochtimes.com/rssfeeds feeds = [ @@ -52,4 +53,6 @@ class EpochTimes(BasicNewsRecipe): if title is not None and fi is not None: title.extract() fi.insert_before(title) + for div in soup.findAll(**classes('post-main'))[1:]: + div.extract() return soup