Skip to content

Commit

Permalink
added logo url to .info
Browse files Browse the repository at this point in the history
  • Loading branch information
ranaroussi committed Dec 4, 2019
1 parent 04f9593 commit 1621b7c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions yfinance/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,14 @@ def cleanup(data):
if isinstance(data.get(item), dict):
self._info.update(data[item])

self._info['logo_url'] = ""
try:
domain = self._info['website'].split(
'://')[1].split('/')[0].replace('www.', '')
self._info['logo_url'] = 'https://logo.clearbit.com/%s' % domain
except Exception:
pass

# events
try:
cal = _pd.DataFrame(
Expand Down

0 comments on commit 1621b7c

Please sign in to comment.