This commit is contained in:
Kovid Goyal 2023-07-18 16:01:16 +05:30
commit 7d2ec02311
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 10 additions and 8 deletions

View File

@ -154,11 +154,12 @@ class Bloomberg(BasicNewsRecipe):
if item['type'] == 'entity':
if item['content'] and item['content'][0] and item['content'][0]['value']:
if item['subType'] == 'person' or 'security':
body += item['content'][0]['value']
if item['subType'] == 'story':
if item['data'] and item['data']['link'] and item['data']['link']['destination'] and item['data']['link']['destination']['web']:
body += '<a href="' + item['data']['link']['destination']['web'] + '">' + item.content[0].value + '</a>'
if item['data'] and item['data']['link'] and item['data']['link']['destination']:
if 'web' in item['data']['link']['destination']:
body += '<a href="' + item['data']['link']['destination']['web'] + '">' + item['content'][0]['value'] + '</a>'
elif item['subType'] == 'person' or 'security':
body += item['content'][0]['value']
if objects['type'] == 'quote':
if 'content' not in objects:

View File

@ -148,11 +148,12 @@ class Bloomberg(BasicNewsRecipe):
if item['type'] == 'entity':
if item['content'] and item['content'][0] and item['content'][0]['value']:
if item['subType'] == 'person' or 'security':
body += item['content'][0]['value']
if item['subType'] == 'story':
if item['data'] and item['data']['link'] and item['data']['link']['destination'] and item['data']['link']['destination']['web']:
body += '<a href="' + item['data']['link']['destination']['web'] + '">' + item.content[0].value + '</a>'
if item['data'] and item['data']['link'] and item['data']['link']['destination']:
if 'web' in item['data']['link']['destination']:
body += '<a href="' + item['data']['link']['destination']['web'] + '">' + item['content'][0]['value'] + '</a>'
elif item['subType'] == 'person' or 'security':
body += item['content'][0]['value']
if objects['type'] == 'quote':
if 'content' not in objects: