Skip to content

Commit

Permalink
Merge pull request #1422 from ranaroussi/hotfix/disable-decrypt-fail-msg
Browse files Browse the repository at this point in the history
Disable annoying 'backup decrypt' msg
  • Loading branch information
ValueRaider authored Feb 16, 2023
2 parents 62a442b + 952a043 commit 6b8b0d5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions yfinance/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,11 +290,11 @@ def get_json_data_stores(self, sub_page: str = None, proxy=None) -> dict:
# Gather decryption keys:
soup = BeautifulSoup(response.content, "html.parser")
keys = self._get_decryption_keys_from_yahoo_js(soup)
if len(keys) == 0:
msg = "No decryption keys could be extracted from JS file."
if "requests_cache" in str(type(response)):
msg += " Try flushing your 'requests_cache', probably parsing old JS."
print("WARNING: " + msg + " Falling back to backup decrypt methods.")
# if len(keys) == 0:
# msg = "No decryption keys could be extracted from JS file."
# if "requests_cache" in str(type(response)):
# msg += " Try flushing your 'requests_cache', probably parsing old JS."
# print("WARNING: " + msg + " Falling back to backup decrypt methods.")
if len(keys) == 0:
keys = []
try:
Expand Down

0 comments on commit 6b8b0d5

Please sign in to comment.