diff --git a/recipes/economist.recipe b/recipes/economist.recipe
index 733dd03652..63f3766805 100644
--- a/recipes/economist.recipe
+++ b/recipes/economist.recipe
@@ -62,15 +62,11 @@ def parse_txt(ty):
'italic': lambda: [f'{"".join(parse_txt(c))}' for c in children],
'linebreak': lambda: ['
'],
'external_link': lambda: [
- f'{"".join(parse_txt(children[0]))}'
- ]
- if children
- else [],
+ f'{"".join(parse_txt(c))}' for c in children
+ ],
'internal_link': lambda: [
- f'{"".join(parse_txt(children[0]))}'
- ]
- if children
- else [],
+ f'{"".join(parse_txt(c))}' for c in children
+ ],
'ufinish': lambda: [text for c in children for text in parse_txt(c)],
'subscript': lambda: [f'{"".join(parse_txt(c))}' for c in children],
'superscript': lambda: [f'{"".join(parse_txt(c))}' for c in children],
@@ -278,6 +274,12 @@ class Economist(BasicNewsRecipe):
)
return ans
+ def economist_test_article(self):
+ self.from_web = False
+ return [('Articles', [{'title': 'test',
+ 'url': 'https://www.economist.com/china/2025/09/10/china-is-ditching-the-dollar-fast'
+ }])]
+
def parse_index(self):
# return self.economist_test_article()
edition_date = self.recipe_specific_options.get('date')
diff --git a/recipes/economist_free.recipe b/recipes/economist_free.recipe
index 733dd03652..63f3766805 100644
--- a/recipes/economist_free.recipe
+++ b/recipes/economist_free.recipe
@@ -62,15 +62,11 @@ def parse_txt(ty):
'italic': lambda: [f'{"".join(parse_txt(c))}' for c in children],
'linebreak': lambda: ['
'],
'external_link': lambda: [
- f'{"".join(parse_txt(children[0]))}'
- ]
- if children
- else [],
+ f'{"".join(parse_txt(c))}' for c in children
+ ],
'internal_link': lambda: [
- f'{"".join(parse_txt(children[0]))}'
- ]
- if children
- else [],
+ f'{"".join(parse_txt(c))}' for c in children
+ ],
'ufinish': lambda: [text for c in children for text in parse_txt(c)],
'subscript': lambda: [f'{"".join(parse_txt(c))}' for c in children],
'superscript': lambda: [f'{"".join(parse_txt(c))}' for c in children],
@@ -278,6 +274,12 @@ class Economist(BasicNewsRecipe):
)
return ans
+ def economist_test_article(self):
+ self.from_web = False
+ return [('Articles', [{'title': 'test',
+ 'url': 'https://www.economist.com/china/2025/09/10/china-is-ditching-the-dollar-fast'
+ }])]
+
def parse_index(self):
# return self.economist_test_article()
edition_date = self.recipe_specific_options.get('date')