-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to switch root url to query2.finance.yahoo.com #426
Comments
Thanks, agree, this will probably help me decide what to do finally with #109. And I guess what what you said in mind, we should use |
P.S. In the meantime you could probably do something like the following (untested): if (!yahooFinance._fetchOrig) {
yahooFinance._fetchOrig = yahooFinance._fetch;
yahooFinance._fetch = function proxyFetch(urlBase, ...args) {
urlBase = urlBase.replace(/query1/, 'query2');
return this._fetchOrig(urlBase, ...args);
};
} |
This will be in our next release. There'll be an automated notice here when that happens. |
🎉 This issue has been resolved in version 2.3.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
As per https://github.com/gadicc/node-yahoo-finance2/blob/devel/docs/other/setGlobalConfig.md#options-not-documented-elsewhere, you can now: yahoo-finance.setGlobalConfig({
YF_QUERY_HOST: "query2.yahoo.finance.com" // default
}); or set the |
Feature Request
For context, I started getting
EAI_AGAIN
errors in production which imply DNS resolution issues. This Stack Overflow post suggests that to resolve/mitigate the issue we could try to switch over toquery2.finance.yahoo.com
instead of the usualquery1.finance.yahoo.com
.The major difference is that query2 is HTTP/1.1 compatible which works better with proxies, e.g. Cloudflare.
Wanted Feature
A (global?) option which allows to select which root URL to use or to pass your own root.
The text was updated successfully, but these errors were encountered: