mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 18:54:09 -04:00
Merge branch 'master' of https://github.com/unkn0w7n/calibre
This commit is contained in:
commit
7d2ec02311
@ -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:
|
||||
|
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user