mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Merge branch 'master' of https://github.com/unkn0w7n/calibre
This commit is contained in:
commit
ea411bb6e6
@ -129,7 +129,7 @@ class LiveMint(BasicNewsRecipe):
|
|||||||
|
|
||||||
def preprocess_raw_html(self, raw, *a):
|
def preprocess_raw_html(self, raw, *a):
|
||||||
# remove empty p tags
|
# remove empty p tags
|
||||||
raw = re.sub(r'(<p>\s*)(<[^\/])', '\g<2>', re.sub(r'(<p>\s* \s*<\/p>)|(<p>\s*<\/p>)', '', raw))
|
raw = re.sub(r'(<p>\s* \s*<\/p>)|(<p>\s*<\/p>)', '', raw)
|
||||||
if '<script>var wsjFlag=true;</script>' in raw:
|
if '<script>var wsjFlag=true;</script>' in raw:
|
||||||
m = re.search(r'type="application/ld\+json">[^<]+?"@type": "NewsArticle"', raw)
|
m = re.search(r'type="application/ld\+json">[^<]+?"@type": "NewsArticle"', raw)
|
||||||
raw1 = raw[m.start():]
|
raw1 = raw[m.start():]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user