Open phenc opened 3 years ago
this is true for the following functions:
while all the other get_*_information functions work as expected. I have the suspicion that the above functions actually has a different problem as the 406 indicates.
Hi @phenc and @KIC! Thank you for reporting this issue 👍🏻
As KIC says those functions tend to throw that concrete exception as somehow Investing.com is limiting the requests just for stock data, which does not make much sense, but AFAIK that's an Investing.com issue that I cannot handle 😩 Some alternative solutions have been proposed such as letting the users define a proxy for the requests module so that those requests do not fail, but anyway this seems to be a tricky thing!
I'll have another look at the code so as to check that there is no difference between the stock requests and all the other financial product ones! I will let you know in a couple of days 🔥
If this is really the case then one might consider using TorPy. For sure this doesn't make things faster but at least we can get the data. And they have a zero external (like tor client) dependency drop-in replacement for the requests library which would make things rather easy from an implementation point of view.
Thanks for the suggestion @KIC I didn't know about this package, I'll give it a try! 👍🏻
BTW @KIC I've just seen your project pandas-ml-quant and I encourage you to include it in the README.md section of this repository in the "Utilities" section, which is basically forking the project, including your project in the list with a short description of the project and your username 👍🏻 Feel free to do it! I'm cool with you including your repository as a featured utility 😄
unfortunately the investpy functionality is currently broken 🙈. but I will fix it soon and update the readme as suggested. thank you very much for the opportunity.
A "ConnectionError: ERR#0015: error 406, try again later" has started to occur since few hours ago when calling the said function