Skip to content

Commit e0000cd

Browse files
authored
Merge pull request #1595 from signifer-geo/bug20230714
Update quote.py
2 parents b063940 + 11d43eb commit e0000cd

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

yfinance/scrapers/quote.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
info_retired_keys = info_retired_keys_price | info_retired_keys_exchange | info_retired_keys_marketCap | info_retired_keys_symbol
2121

2222

23-
_BASIC_URL_ = "https://query2.finance.yahoo.com/v10/finance/quoteSummary"
24-
23+
_BASIC_URL_ = "https://query2.finance.yahoo.com/v6/finance/quoteSummary"
2524

2625
from collections.abc import MutableMapping
2726
class InfoDictWrapper(MutableMapping):
@@ -589,8 +588,12 @@ def _fetch(self, proxy):
589588
self._already_fetched = True
590589
modules = ['summaryProfile', 'financialData', 'quoteType',
591590
'defaultKeyStatistics', 'assetProfile', 'summaryDetail']
591+
params_dict = {}
592+
for m in modules:
593+
params_dict["modules"] = m
594+
params_dict["ssl"] = "true"
592595
result = self._data.get_raw_json(
593-
_BASIC_URL_ + f"/{self._data.ticker}", params={"modules": ",".join(modules), "ssl": "true"}, proxy=proxy
596+
_BASIC_URL_ + f"/{self._data.ticker}", params=params_dict, proxy=proxy
594597
)
595598
result["quoteSummary"]["result"][0]["symbol"] = self._data.ticker
596599
query1_info = next(

0 commit comments

Comments
 (0)