Bloomberg recipes update

increased delay.
This commit is contained in:
unkn0w7n 2023-06-26 00:59:52 +05:30
parent 258e168687
commit a655f3cfac
2 changed files with 9 additions and 9 deletions

View File

@ -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 = '<div id="subhead"><p>' + data['abstract'][0] + '</p><p>' + data['abstract'][1] + '</p></div>'
else:
if 'summary' in data:
subhead = '<div id="subhead">' + data['summary'] + '</div>'
subhead = '<div id="subhead"><p>' + data['summary'] + '</p></div>'
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 = '<p><img src="{}">'.format(data['ledeImageUrl'].replace('\\', ''))
lede = '<p><img src="{}">'.format(data['ledeImageUrl'])
if data['ledeDescription'] is not None:
caption = '<span id="cap">' + data['ledeDescription'] + '</span>'
body = data['body'].replace('\\', '')
body = data['body']
html = '<html><body>' + cat + title + subhead + auth + lede + caption + '<div>' + body
return html

View File

@ -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 = '<div id="subhead"><p>' + data['abstract'][0] + '</p><p>' + data['abstract'][1] + '</p></div>'
else:
if 'summary' in data:
subhead = '<div id="subhead">' + data['summary'] + '</div>'
subhead = '<div id="subhead"><p>' + data['summary'] + '</p></div>'
if 'byline' in data:
if data['byline'] is not None: