From 741893dd26e634c51b7ec4994afa1eb21d7a9598 Mon Sep 17 00:00:00 2001 From: unkn0w7n <51942695+unkn0w7n@users.noreply.github.com> Date: Sun, 22 Sep 2024 21:58:35 +0530 Subject: [PATCH 1/2] Update tls_mag.recipe book details --- recipes/tls_mag.recipe | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/recipes/tls_mag.recipe b/recipes/tls_mag.recipe index 6114bce8d2..041df92226 100644 --- a/recipes/tls_mag.recipe +++ b/recipes/tls_mag.recipe @@ -117,6 +117,14 @@ class tls(BasicNewsRecipe): if 'bookdetails' in prim and prim['bookdetails']: bks += '
' + for a in prim['bookdetails']: + for x, y in a.items(): + if isinstance(y, str): + if x == 'imageurl': + bks += ''.format(y) + elif y: + bks += '
' + y + '
\n' + bks += '
' else: prim = title = desc = label = auth = lede = bks = '' From 0a94f5c763a5f789af278fefd92aa4eb0049db53 Mon Sep 17 00:00:00 2001 From: unkn0w7n <51942695+unkn0w7n@users.noreply.github.com> Date: Sun, 22 Sep 2024 22:31:16 +0530 Subject: [PATCH 2/2] ... --- recipes/nytimes_sub.recipe | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/nytimes_sub.recipe b/recipes/nytimes_sub.recipe index 07a4c1bb57..96d67567d4 100644 --- a/recipes/nytimes_sub.recipe +++ b/recipes/nytimes_sub.recipe @@ -112,7 +112,7 @@ class NewYorkTimes(BasicNewsRecipe): if use_wayback_machine and not skip_wayback: from calibre import browser return self.nyt_parser.download_url(url, browser()) - return self.index_to_soup(url) + return self.index_to_soup(url, raw=True) def preprocess_raw_html(self, raw_html, url): if '/interactive/' in url: