From dc82b068e947298d7adb96090b42268f01c16bc4 Mon Sep 17 00:00:00 2001 From: unkn0w7n <51942695+unkn0w7n@users.noreply.github.com> Date: Thu, 28 Nov 2024 09:25:51 +0530 Subject: [PATCH] Update economist_world_ahead.recipe --- recipes/economist_world_ahead.recipe | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/recipes/economist_world_ahead.recipe b/recipes/economist_world_ahead.recipe index 33f1d55859..03c0519065 100644 --- a/recipes/economist_world_ahead.recipe +++ b/recipes/economist_world_ahead.recipe @@ -24,7 +24,7 @@ def process_node(node): if ntype == 'CROSSHEAD': if node.get('textHtml'): return f'

{node.get("textHtml")}

' - return f'

{node.get("tex", "")}

' + return f'

{node.get("text", "")}

' if ntype == 'PARAGRAPH': if node.get('textHtml'): return f'

{node.get("textHtml")}

' @@ -41,7 +41,10 @@ def process_node(node): return f'
{node.get("textHtml")}
' return f'
{node.get("text", "")}
' elif ntype == 'DIVIDER': - return '
' + return '
' + elif ntype == 'INFOBOX': + for x in safe_dict(node, 'components'): + return f'
{process_node(x)}
' elif ntype: print('** ', ntype) return '' @@ -194,7 +197,7 @@ class EconomistWorld(BasicNewsRecipe): def economist_test_article(self): self.cover_url = None return [('Articles', [{'title':'test', - 'url':'https://www.economist.com/the-world-ahead/2024/11/20/what-the-superforecasters-predict-for-major-events-in-2025' + 'url':'https://www.economist.com/the-world-ahead/2024/11/20/ten-business-trends-for-2025-and-forecasts-for-15-industries' }])] def economist_return_index(self, ans):