From 96aead4da953b1897a10c50993e6e846193dcdaa Mon Sep 17 00:00:00 2001
From: unkn0w7n <51942695+unkn0w7n@users.noreply.github.com>
Date: Sun, 10 Mar 2024 16:54:59 +0530
Subject: [PATCH] update bloomberg
---
recipes/bloomberg-business-week.recipe | 4 ++--
recipes/bloomberg.recipe | 4 ++--
recipes/natgeo.recipe | 2 +-
recipes/natgeohis.recipe | 2 +-
recipes/natgeomag.recipe | 2 +-
5 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/recipes/bloomberg-business-week.recipe b/recipes/bloomberg-business-week.recipe
index c90f9bfbc7..297a107792 100644
--- a/recipes/bloomberg-business-week.recipe
+++ b/recipes/bloomberg-business-week.recipe
@@ -30,7 +30,7 @@ def get_contents(x):
return '
' + x.get('value', '') + ''.join(map(get_contents, x.get('content', ''))) + '
'
elif otype == 'media':
if x['subType'] == 'photo':
- return ''.format(
+ return ''.format(
x['data']['photo']['src'], x['data']['photo']['caption'], x['data']['photo']['credit'])
elif x['subType'] == 'chart':
if x['data'] and x['data']['chart']:
@@ -78,7 +78,7 @@ class Bloomberg(BasicNewsRecipe):
extra_css = '''
.auth {font-size:small; font-weight:bold;}
.time, .chart, .css--lede-byline, .css--lede-timestamp {font-size:small;}
- .subhead {font-style:italic; color:#404040;}
+ .subhead, .cap span {font-style:italic; color:#404040;}
em, .col {color:#202020;}
.cat {font-size:small; color:gray;}
.news-figure-caption-text, .cap, .img, .css--caption-outer-wrapper {font-size:small; text-align:center;}
diff --git a/recipes/bloomberg.recipe b/recipes/bloomberg.recipe
index 0a1841bb3f..e525d3cbb4 100644
--- a/recipes/bloomberg.recipe
+++ b/recipes/bloomberg.recipe
@@ -31,7 +31,7 @@ def get_contents(x):
return '' + x.get('value', '') + ''.join(map(get_contents, x.get('content', ''))) + '
'
elif otype == 'media':
if x['subType'] == 'photo':
- return ''.format(
+ return ''.format(
x['data']['photo']['src'], x['data']['photo']['caption'], x['data']['photo']['credit'])
elif x['subType'] == 'chart':
if x['data'] and x['data']['chart']:
@@ -77,7 +77,7 @@ class Bloomberg(BasicNewsRecipe):
extra_css = '''
.auth {font-size:small; font-weight:bold;}
.time, .chart {font-size:small;}
- .subhead {font-style:italic; color:#404040;}
+ .subhead, .cap span {font-style:italic; color:#404040;}
em, .col {color:#202020;}
.cat {font-size:small; color:gray;}
.news-figure-caption-text, .cap, .img {font-size:small; text-align:center;}
diff --git a/recipes/natgeo.recipe b/recipes/natgeo.recipe
index f3bab4bc22..a5f0a15cb4 100644
--- a/recipes/natgeo.recipe
+++ b/recipes/natgeo.recipe
@@ -19,7 +19,7 @@ def classes(classes):
def extract_json(raw):
s = raw.find("window['__natgeo__']")
script = raw[s:raw.find('', s)]
- data = json.loads(script[script.find('{'):].rstrip(';'))['page']['content']['prismarticle']
+ return json.loads(script[script.find('{'):].rstrip(';'))['page']['content']['prismarticle']
def parse_contributors(grp):
diff --git a/recipes/natgeohis.recipe b/recipes/natgeohis.recipe
index e56c01b825..b005e9e339 100644
--- a/recipes/natgeohis.recipe
+++ b/recipes/natgeohis.recipe
@@ -18,7 +18,7 @@ def classes(classes):
def extract_json(raw):
s = raw.find("window['__natgeo__']")
script = raw[s:raw.find('', s)]
- data = json.loads(script[script.find('{'):].rstrip(';'))['page']['content']['prismarticle']
+ return json.loads(script[script.find('{'):].rstrip(';'))['page']['content']['prismarticle']
def parse_contributors(grp):
diff --git a/recipes/natgeomag.recipe b/recipes/natgeomag.recipe
index 3736001438..98d444ada7 100644
--- a/recipes/natgeomag.recipe
+++ b/recipes/natgeomag.recipe
@@ -23,7 +23,7 @@ def classes(classes):
def extract_json(raw):
s = raw.find("window['__natgeo__']")
script = raw[s:raw.find('', s)]
- data = json.loads(script[script.find('{'):].rstrip(';'))['page']['content']['prismarticle']
+ return json.loads(script[script.find('{'):].rstrip(';'))['page']['content']['prismarticle']
def parse_contributors(grp):