Skip to content

Commit b359f3d

Browse files
committed
Improve debug log for crumb fetch - again 2
1 parent 4c2d3cb commit b359f3d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

yfinance/data.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,9 +364,9 @@ def get(self, url, user_agent_headers=None, params=None, proxy=None, timeout=30)
364364
'headers': user_agent_headers or self.user_agent_headers
365365
}
366366
response = self._session.get(**request_args)
367+
utils.get_yf_logger().debug(f'response code={response.status_code}')
367368
if response.status_code >= 400:
368369
# Retry with other cookie strategy
369-
utils.get_yf_logger().debug(f'response={response}')
370370
if strategy == 'basic':
371371
self._set_cookie_strategy('csrf')
372372
else:
@@ -376,6 +376,7 @@ def get(self, url, user_agent_headers=None, params=None, proxy=None, timeout=30)
376376
if strategy == 'basic':
377377
request_args['cookies'] = {cookie.name: cookie.value}
378378
response = self._session.get(**request_args)
379+
utils.get_yf_logger().debug(f'response code={response.status_code}')
379380

380381
return response
381382

0 commit comments

Comments
 (0)