From a655f3cfac8ac470ec4198784cf87a4bf764946c Mon Sep 17 00:00:00 2001
From: unkn0w7n <51942695+unkn0w7n@users.noreply.github.com>
Date: Mon, 26 Jun 2023 00:59:52 +0530
Subject: [PATCH] Bloomberg recipes update
increased delay.
---
recipes/bloomberg-business-week.recipe | 8 ++++----
recipes/bloomberg.recipe | 10 +++++-----
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/recipes/bloomberg-business-week.recipe b/recipes/bloomberg-business-week.recipe
index 763cc0185a..70dcd76418 100644
--- a/recipes/bloomberg-business-week.recipe
+++ b/recipes/bloomberg-business-week.recipe
@@ -14,7 +14,7 @@ class Bloomberg(BasicNewsRecipe):
ignore_duplicate_articles = {'url'}
resolve_internal_links = True
masthead_url = 'https://assets.bwbx.io/s3/javelin/public/hub/images/BW-Logo-Black-cc9035fbb3.svg'
- delay = 2
+ delay = 3 # seconds
extra_css = '''
#auth {font-size:small; font-weight:bold;}
#time {font-size:small;}
@@ -94,7 +94,7 @@ class Bloomberg(BasicNewsRecipe):
subhead = '
' + data['abstract'][0] + '
' + data['abstract'][1] + '
'
else:
if 'summary' in data:
- subhead = '' + data['summary'] + '
'
+ subhead = ''
if 'byline' in data:
if data['byline'] is not None:
@@ -103,12 +103,12 @@ class Bloomberg(BasicNewsRecipe):
if 'ledeImageUrl' in data:
if data['ledeImageUrl'] is not None:
- lede = '
'.format(data['ledeImageUrl'].replace('\\', ''))
+ lede = '
'.format(data['ledeImageUrl'])
if data['ledeDescription'] is not None:
caption = '' + data['ledeDescription'] + ''
- body = data['body'].replace('\\', '')
+ body = data['body']
html = '
' + cat + title + subhead + auth + lede + caption + '' + body
return html
diff --git a/recipes/bloomberg.recipe b/recipes/bloomberg.recipe
index ef8fee5e8c..ec72c73443 100644
--- a/recipes/bloomberg.recipe
+++ b/recipes/bloomberg.recipe
@@ -13,8 +13,8 @@ class Bloomberg(BasicNewsRecipe):
remove_attributes = ['style', 'height', 'width']
ignore_duplicate_articles = {'url', 'title'}
resolve_internal_links = True
- oldest_article = 2 # days
- delay = 1.5
+
+ delay = 5 # seconds
extra_css = '''
#auth {font-size:small; font-weight:bold;}
@@ -53,11 +53,11 @@ class Bloomberg(BasicNewsRecipe):
feeds = [
('Features',
'https://news.google.com/rss/search?q=when:27h+allinurl:bloomberg.com%2Fnews%2Ffeatures%2F&hl=en-US&gl=US&ceid=US:en'),
- ('News',
- 'https://news.google.com/rss/search?q=when:27h+allinurl:bloomberg.com%2Fnews%2Farticles%2F&hl=en-US&gl=US&ceid=US:en'),
('Opinion', 'https://news.google.com/rss/search?q=when:27h+allinurl:bloomberg.com%2Fopinion%2F&hl=en-US&gl=US&ceid=US:en'),
('Newsletters',
'https://news.google.com/rss/search?q=when:27h+allinurl:bloomberg.com%2Fnews%2Fnewsletters%2F&hl=en-US&gl=US&ceid=US:en'),
+ ('News',
+ 'https://news.google.com/rss/search?q=when:27h+allinurl:bloomberg.com%2Fnews%2Farticles%2F&hl=en-US&gl=US&ceid=US:en'),
('Others', 'https://news.google.com/rss/search?q=when:27h+allinurl:bloomberg.com&hl=en-US&gl=US&ceid=US:en')
]
@@ -84,7 +84,7 @@ class Bloomberg(BasicNewsRecipe):
subhead = '
' + data['abstract'][0] + '
' + data['abstract'][1] + '
'
else:
if 'summary' in data:
- subhead = '
' + data['summary'] + '
'
+ subhead = '
'
if 'byline' in data:
if data['byline'] is not None: