Open hwypengsir opened 10 months ago
Proxy functionality isn't covered by unit tests so could break without knowing, and most (all?) developers don't use proxy so you have to debug and fix. If you know of a good free proxy, then please consider adding unit tests.
First, try dev
branch #1080
At present, at least 1.4 billion / 8 billion people realy need to use this function.
The simplest way to test using a proxy is SSH port forward:
$ ssh -CND 12345 -p 22 user@another_pc
Keep it running.
Then create a new tty, get something through the proxy:
$ curl -vvv -x socks5://localhost:12345 https://www.yahoo.com
Or, provide a way to shutdown lru_cache, let the user self-manage the access rate limit.
THK a lot!
@hwypengsir , try code below:
import yfinance as yf
saddr = 'socks5h://localhost:12345'
yf.Ticker('MSFT').history('1mo', proxy={"http": saddr, "https": saddr})
I fixed my problem by set proxy in yf.Ticker(...).
It's NOT a lru_cache problem.
The port 2080 can be used to proxy request for yahoo finance server.
Now i want to get the data with yfinance library.
It encounter issue:
How can fix it?