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
6865c5eea3
@ -123,6 +123,7 @@ def load_article_from_web_json(raw):
|
||||
data = json.loads(raw)['props']['pageProps']['cp2Content']
|
||||
body += f'<div style="color: red; font-size:small; font-weight:bold;">{data.get("flyTitle", "")}</div>'
|
||||
body += f'<h1>{data["headline"]}</h1>'
|
||||
if data.get("rubric") and data.get("rubric") is not None:
|
||||
body += f'<div style="font-style: italic; color:#202020;">{data.get("rubric", "")}</div>'
|
||||
try:
|
||||
date = data['dateModified']
|
||||
|
@ -123,6 +123,7 @@ def load_article_from_web_json(raw):
|
||||
data = json.loads(raw)['props']['pageProps']['cp2Content']
|
||||
body += f'<div style="color: red; font-size:small; font-weight:bold;">{data.get("flyTitle", "")}</div>'
|
||||
body += f'<h1>{data["headline"]}</h1>'
|
||||
if data.get("rubric") and data.get("rubric") is not None:
|
||||
body += f'<div style="font-style: italic; color:#202020;">{data.get("rubric", "")}</div>'
|
||||
try:
|
||||
date = data['dateModified']
|
||||
|
@ -98,13 +98,13 @@ class TheHindu(BasicNewsRecipe):
|
||||
raw = self.index_to_soup(url, raw=True)
|
||||
soup = self.index_to_soup(raw)
|
||||
ans = self.hindu_parse_index(soup)
|
||||
cover = soup.find(attrs={'class':'hindu-ad'})
|
||||
if cover:
|
||||
self.cover_url = cover.img['src']
|
||||
if not ans:
|
||||
raise ValueError(
|
||||
'The Hindu Newspaper is not published Today.'
|
||||
)
|
||||
cover = soup.find(attrs={'class':'hindu-ad'})
|
||||
if cover:
|
||||
self.cover_url = cover.img['src']
|
||||
if mag_url:
|
||||
self.log('\nFetching Magazine')
|
||||
soup = self.index_to_soup(mag_url)
|
||||
|
Loading…
x
Reference in New Issue
Block a user