Lacking ability to pass verify parameter with proxy.
nathanlott opened this issue · comments
Describe bug
Unable to pass verify parameter with proxy parameter. Requests.get() accepts "verify" parameter. Some proxies require Verify=True or Verify=. No method to pass parameter when using package, resulting in timeout errors.
Simple code that reproduces your problem
data = ticker.history(period="1d", proxy=proxies['https'])
data = ticker.history(period="1d", proxy=proxies['https'], verify=True)
data = ticker.history(period="1d", proxy=proxies['https'], verify=False)
data = ticker.history(period="1d", proxy=proxies['https'], verify=)
Debug log
https://query2.finance.yahoo.com/v8/finance/chart/T?period1=1707319169&period2=1707319169&interval=1m&includePrePost=false&events=div%7Csplit%7Cearn&&lang=en-US®ion=US
Failed to get ticker 'T' reason: HTTPSConnectionPool(host='fc.yahoo.com', port=443): Read timed out. (read timeout=30)
Traceback (most recent call last):
File "/Users/nl492k/Desktop/Python Sandbox/stocks_test.py", line 21, in
data = ticker.history(period="1d", proxy=proxies['https'], verify=True)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/yfinance/utils.py", line 103, in wrapper
result = func(*args, **kwargs)
TypeError: TickerBase.history() got an unexpected keyword argument 'verify'
Bad data proof
No response
yfinance
version
0.2.36
Python version
3.11
Operating system
No response