Skip to content

Commit

Permalink
chanigng logging around skipped sources
Browse files Browse the repository at this point in the history
  • Loading branch information
lockefox committed Jan 17, 2017
1 parent 797aeb1 commit 6aa7f66
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions bots/prosperbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,18 +88,15 @@ def get_news(ticker:str, percent:float, top_entries=TOP_ENTRIES):
for article in block['a']:
#LOGGER.debug(article)
if article['s'] in ARTICLES_EXCLUDE:
LOGGER.debug('-- skipping because of source')
LOGGER.debug(
'-- skipping source:' +
article['t'] + ' @ ' + article['s']
)
continue
headline = article['t']
url = article['u']
article_dict[headline] = url

if len(article_dict) >= TOP_ENTRIES:
LOGGER.debug(
'-- enough entries' + str(len(article_dict)) + ' hits'
)
break

## Grade the headlines gathered ##
positive = True
neutral = False
Expand Down

0 comments on commit 6aa7f66

Please sign in to comment.