Skip to content

Commit

Permalink
pep8
Browse files Browse the repository at this point in the history
  • Loading branch information
kovidgoyal committed Aug 13, 2023
1 parent a259772 commit 81bba5c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion recipes/bloomberg-business-week.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ def get_contents(x):
if x['subType'] == 'story':
if x['data'] and x['data']['link'] and x['data']['link']['destination']:
if 'web' in x['data']['link']['destination']:
return '<a href="' + x['data']['link']['destination']['web'] + '">' + x.get('value', '') + ''.join(map(get_contents, x.get('content', ''))) + '</a>'
return '<a href="' + x['data']['link']['destination']['web'] + '">' + x.get('value', '') + ''.join(
map(get_contents, x.get('content', ''))) + '</a>'
return '<i>' + x.get('value', '') + ''.join(map(get_contents, x.get('content', ''))) + '</i>'
return '<i>' + x.get('value', '') + ''.join(map(get_contents, x.get('content', ''))) + '</i>'
return '<i>' + x.get('value', '') + ''.join(map(get_contents, x.get('content', ''))) + '</i>'
Expand Down
6 changes: 4 additions & 2 deletions recipes/bloomberg.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ def get_contents(x):
if x['subType'] == 'story':
if x['data'] and x['data']['link'] and x['data']['link']['destination']:
if 'web' in x['data']['link']['destination']:
return '<a href="' + x['data']['link']['destination']['web'] + '">' + x.get('value', '') + ''.join(map(get_contents, x.get('content', ''))) + '</a>'
return '<a href="' + x['data']['link']['destination']['web'] + '">' + x.get('value', '') + ''.join(
map(get_contents, x.get('content', ''))) + '</a>'
return '<i>' + x.get('value', '') + ''.join(map(get_contents, x.get('content', ''))) + '</i>'
return '<i>' + x.get('value', '') + ''.join(map(get_contents, x.get('content', ''))) + '</i>'
return '<i>' + x.get('value', '') + ''.join(map(get_contents, x.get('content', ''))) + '</i>'
Expand All @@ -66,7 +67,8 @@ class Bloomberg(BasicNewsRecipe):
remove_attributes = ['style', 'height', 'width']
ignore_duplicate_articles = {'url', 'title'}
masthead_url = 'https://assets.bbhub.io/company/sites/70/2022/09/logoBBGblck.svg'
description = 'Bloomberg delivers business and markets news, data, analysis, and video to the world, featuring stories from Businessweek and Bloomberg News.'
description = ('Bloomberg delivers business and markets news, data, analysis, and video'
' to the world, featuring stories from Businessweek and Bloomberg News.')

simultaneous_downloads = 1

Expand Down

0 comments on commit 81bba5c

Please sign in to comment.