From 57a9682a71a3614323849808b234d00fca786da7 Mon Sep 17 00:00:00 2001
From: unkn0w7n <51942695+unkn0w7n@users.noreply.github.com>
Date: Sun, 8 Sep 2024 21:26:05 +0530
Subject: [PATCH] Update TLS
missing book details
---
recipes/scmp.recipe | 2 +-
recipes/tls_mag.recipe | 27 ++++++++++++++-------------
2 files changed, 15 insertions(+), 14 deletions(-)
diff --git a/recipes/scmp.recipe b/recipes/scmp.recipe
index ba3abf18d0..fcaba61257 100644
--- a/recipes/scmp.recipe
+++ b/recipes/scmp.recipe
@@ -163,7 +163,7 @@ class SCMP(BasicNewsRecipe):
load_article_from_json(script[0].text, b_root)
except Exception:
return raw_html
- head = root.xpath('//h2') + root.xpath('//h3')
+ head = b_root.xpath('//h2') + b_root.xpath('//h3')
for h2 in head:
h2.tag = 'h4'
raw = etree.tostring(b_root, encoding='unicode')
diff --git a/recipes/tls_mag.recipe b/recipes/tls_mag.recipe
index 1b301d15c0..f3c019685d 100644
--- a/recipes/tls_mag.recipe
+++ b/recipes/tls_mag.recipe
@@ -118,18 +118,6 @@ class tls(BasicNewsRecipe):
else:
prim = title = desc = label = auth = lede = ''
- bks = ''
- if 'bookdetails' in data and data['bookdetails']:
- bks += '
'
- for a in data['bookdetails']:
- for x, y in a.items():
- if isinstance(y, str):
- if x == 'imageurl':
- bks += ''.format(y)
- elif y:
- bks += '