This commit is contained in:
Kovid Goyal 2023-11-25 10:47:42 +05:30
commit 93e6761a63
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -95,6 +95,13 @@ class toiprint(BasicNewsRecipe):
def preprocess_raw_html(self, raw, *a):
data = json.loads(raw)
tags = []
for x in data:
tags.append(x['TagName'])
if not any(x in {'ArticleBody', 'Photographs'} for x in tags):
self.abort_article('not an article')
body = ''
for x in data:
if x['TagName'] == 'ArticleTitle':