Skip to content

Commit

Permalink
Update quote.py
Browse files Browse the repository at this point in the history
dead code deleted
  • Loading branch information
signifer-geo committed Jul 13, 2023
1 parent 509a109 commit 11d43eb
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions yfinance/scrapers/quote.py
Expand Up @@ -21,8 +21,6 @@


_BASIC_URL_ = "https://query2.finance.yahoo.com/v6/finance/quoteSummary"
#_BASIC_URL_ = "https://query2.finance.yahoo.com/v10/finance/quoteSummary"


from collections.abc import MutableMapping
class InfoDictWrapper(MutableMapping):
Expand Down Expand Up @@ -594,9 +592,6 @@ def _fetch(self, proxy):
for m in modules:
params_dict["modules"] = m
params_dict["ssl"] = "true"
# result = self._data.get_raw_json(
# _BASIC_URL_ + f"/{self._data.ticker}", params={"modules": ",".join(modules), "ssl": "true"}, proxy=proxy
# )
result = self._data.get_raw_json(
_BASIC_URL_ + f"/{self._data.ticker}", params=params_dict, proxy=proxy
)
Expand Down

3 comments on commit 11d43eb

@bot-unit
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

now only the last module works, maybe the whole request should be in the 'FOR' loop?

@ValueRaider
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requests in a loop is a bad idea. Also this is fixed #1592 (comment)

@bot-unit
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

    params_dict = 'ssl=true'
    for m in modules:
        params_dict += f'&modules={m}'

Please sign in to comment.