mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 18:54:09 -04:00
...
This commit is contained in:
parent
5cf5cf04de
commit
f7aeb7b490
@ -120,7 +120,7 @@ def process_web_node(node):
|
|||||||
def load_article_from_web_json(raw):
|
def load_article_from_web_json(raw):
|
||||||
# open('/t/raw.json', 'w').write(raw)
|
# open('/t/raw.json', 'w').write(raw)
|
||||||
body = ''
|
body = ''
|
||||||
data = json.loads(raw)['props']['pageProps']['cp2Content']
|
data = json.loads(raw)['props']['pageProps']['content']
|
||||||
body += f'<div style="color: red; font-size:small; font-weight:bold;">{data.get("flyTitle", "")}</div>'
|
body += f'<div style="color: red; font-size:small; font-weight:bold;">{data.get("flyTitle", "")}</div>'
|
||||||
body += f'<h1>{data["headline"]}</h1>'
|
body += f'<h1>{data["headline"]}</h1>'
|
||||||
if data.get('rubric') and data.get('rubric') is not None:
|
if data.get('rubric') and data.get('rubric') is not None:
|
||||||
|
@ -120,7 +120,7 @@ def process_web_node(node):
|
|||||||
def load_article_from_web_json(raw):
|
def load_article_from_web_json(raw):
|
||||||
# open('/t/raw.json', 'w').write(raw)
|
# open('/t/raw.json', 'w').write(raw)
|
||||||
body = ''
|
body = ''
|
||||||
data = json.loads(raw)['props']['pageProps']['cp2Content']
|
data = json.loads(raw)['props']['pageProps']['content']
|
||||||
body += f'<div style="color: red; font-size:small; font-weight:bold;">{data.get("flyTitle", "")}</div>'
|
body += f'<div style="color: red; font-size:small; font-weight:bold;">{data.get("flyTitle", "")}</div>'
|
||||||
body += f'<h1>{data["headline"]}</h1>'
|
body += f'<h1>{data["headline"]}</h1>'
|
||||||
if data.get('rubric') and data.get('rubric') is not None:
|
if data.get('rubric') and data.get('rubric') is not None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user