diff --git a/recipes/toiprint.recipe b/recipes/toiprint.recipe index ff6a4ba7f1..d901a85c64 100644 --- a/recipes/toiprint.recipe +++ b/recipes/toiprint.recipe @@ -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':