mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 18:54:09 -04:00
Merge branch 'master' of https://github.com/unkn0w7n/calibre
This commit is contained in:
commit
93e6761a63
@ -95,6 +95,13 @@ class toiprint(BasicNewsRecipe):
|
|||||||
|
|
||||||
def preprocess_raw_html(self, raw, *a):
|
def preprocess_raw_html(self, raw, *a):
|
||||||
data = json.loads(raw)
|
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 = ''
|
body = ''
|
||||||
for x in data:
|
for x in data:
|
||||||
if x['TagName'] == 'ArticleTitle':
|
if x['TagName'] == 'ArticleTitle':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user