We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f5df1d5 + 3288aab commit f39cd17Copy full SHA for f39cd17
yfinance/base.py
@@ -350,11 +350,15 @@ def cleanup(data):
350
self._info.update(data[item])
351
except Exception:
352
pass
353
+
354
+ if not isinstance(data.get('summaryDetail'), dict):
355
+ # For some reason summaryDetail did not give any results. The price dict usually has most of the same info
356
+ self._info.update(data.get('price', {}))
357
358
try:
359
# self._info['regularMarketPrice'] = self._info['regularMarketOpen']
360
self._info['regularMarketPrice'] = data.get('price', {}).get(
- 'regularMarketPrice', self._info['regularMarketOpen'])
361
+ 'regularMarketPrice', self._info.get('regularMarketOpen', None))
362
363
364
0 commit comments