Closed kevin-setiawan closed 3 years ago
I think they changed something on the website and the scraper fails everytime.. hopefully the developer will fix the issue soon..
Same Problem for me. It worked the day before. No code changes, no change of version of investpy. Today it doesnt work any more.
investpy 1.0.4
python3.6/site-packages/investpy/indices.py",` line 606, in get_index_historical_data
raise RuntimeError("ERR#0004: data retrieval error while scraping.")
I wrote about a solution to this on #327. You can make the changes manually until the fix is implemented, by removing the br
encoding option from the header field Accept-Encoding
.
I wrote about a solution to this on #327. You can make the changes manually until the fix is implemented, by removing the
br
encoding option from the header fieldAccept-Encoding
.
Many thanks! I removed the all br's in search.py, search._obj.py and etfs.py and now up and running! Before: "Accept-Encoding": "gzip, deflate, br", After: "Accept-Encoding": "gzip, deflate",
Thanks a lot to everyone, especially to @nhlsm and to @danilogalisteu, as the solution they proposed works like a charm. The tests are already running, but once I check everything is OK (besides the Investing.com issues that have nothing to do with investpy), I'll upload the new release mentioning everyone involved in solving it! :fire: Thanks for this awesome support and sorry for my delayed response.
You can install the new-fixed version as it follows:
pip install investpy==1.0.5
Sorry for the inconvenience, seems that Investing.com is applying a lot of changes and under maintenance... Everyone thank both @danilogalisteu and @nhlsm for their awesome support! 👍🏻
Feel free to drop some comments here https://github.com/alvarobartt/investpy/discussions/334 and more information if applicable, such as the IDs of the solved issues and so on, so that I can include all the information into the Release Notes! :hugs: Thank you!
Hello I encounter a problem just today when I am using the command which retrieves data from investing. com Yesterday it runs alright without any problem. I tried using 2 different command :
RuntimeError: ERR#0004: data retrieval error while scraping.
result = investpy.get_stock_information('bbca','indonesia') and I get this result :
File "C:\Users\G40.80\Anaconda3\lib\site-packages\investpy\stocks.py", line 1133, in get_stock_information elif value.contains('T'):
RuntimeError: ERR#0004: data retrieval error while scraping.
Thankyou.