-
Notifications
You must be signed in to change notification settings - Fork 380
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
ConnectionError: ERR#0015: error 403, try again later. #600
Comments
I've the same issue, from my investigation https://www.investing.com/instruments/HistoricalDataAjax seems to be discontinued! |
I've the same issue. |
Same issue, any update on this? |
I have the same File "D:\Python39\lib\site-packages\investpy\search.py", line 127, in search_quotes |
Same here. /usr/local/lib/python3.7/dist-packages/investpy/stocks.py in get_stock_historical_data(stock, country, from_date, to_date, as_json, order, interval) ConnectionError: ERR#0015: error 403, try again later. |
Same here. Did some research and it seems error 403 indicates that the server understands the request but refuses to authorize it. |
You can still pull the economic calendar but everything else seems to be returning a 403. |
Also confirming get_index_historical_data yields "ConnectionError: ERR#0015: error 403, try again later" (tried multiple US symbols) but econ calendar still works. Was working yesterday |
Hi everyone! I've checked this issue and it seems that the internal API that Investing.com uses has changed without prior notice, as this is not an official implementation. Sorry for the inconvenience, this issue will be solved in the upcoming days, hopefully, today I'll push a patch to solve this, I'll share later on with you the branch where I'm working actively to solve this! |
Both |
Hi again everyone, feel free to track the progress of the patch at #602 🤗 I'd also appreciate some feedback from the ones testing it! So drop your feedback either here or in https://twitter.com/alvarobartt/status/1570661023262310402 |
Commodity historical data not working investpy.get_commodity_historical_data ConnectionError: ERR#0015: error 403, try again later. |
Hi @alvarobartt ,
Error-
Really Appreciate your efforts. Thank you so much. |
Could anyone help me on how to install the patch? Python gives me an error. Thank you! |
@MetalComm Which IDE you are using, |
thank you, but... is the URL correct? Beacause I get this error: |
Did installed the patch and tried to run my programs, but still getting the same BTW, I'm using the below:
|
Soooo it seems that it was working like 1 hour away or so and now suddenly stopped working again... So I'll keep on investigating it... It works from the browser and also from Postman, Thunder Client, and similar, but from Python it seems that it doesn't work now... |
indices method still not work
|
Hi @Exganza so the fix is pending, since |
It seems that after a certain number of requests Cloudflare blocks you... So it's not stable... |
thank you @alvarobartt |
I found incomplete solution using cloudscraper module. ( NOTE!, incomplete solution )
additional reference |
I'm a newbie so I'm probably missing something but scraping from the following url seems to work still fine (I don't know how long it will last) https://advcharts.investing.com/advinion2016/advanced-charts/9/9/16/GetRecentHistory?strSymbol=46891&iTop=1500&strPriceType=bid&strFieldsMode=allFields&lang_ID=9&strTimeFrame=1D |
Hi, @alvarobartt ! I'm using Python 3.10.5 Maybe this can solve all 403 errors in the project? minimal working example: import urllib.request
# take them from your browser, no cookies required
headers = {}
req = urllib.request.Request(f'https://sbcharts.investing.com/events_charts/us/222.json', b"", headers)
with urllib.request.urlopen(req) as response:
response = response.read().decode() |
Thanks @KostyaCholak can you please open a separate issue at https://github.com/alvarobartt/investiny? I'll try to test that approach later today, thanks! |
hello everyone, my name is andres, I am a python programming student and investPY made me very happy, I would like to know if maybe investPY could find a solution by the end of the year? I don't know how serious the error is but from what I've been investigating it seems to be an update issue of investing.com itself. I thank all developers for their time and stay tuned. |
Hi @alvarobartt ,wondering if you get any update or feedback from Investing.com regarding this restriction? If they are open-source, it should allow everyone to do web-scraping. Thanks! |
Hi, @alvarobartt, I am a student of data science from the Netherlands and I am looking for some open source bond data. I came across InvestPy and this looks like a very useful package to get some history of corporate bonds. Unfortunately I encountered this 403 error when I try to run the examples. Is there a fix now? Or a fix expected shortly? Also - when I install the package it gives an error on the idna package:
Then it says it does install succesfully:
So I was wondering if this is a problem as well. Thanks in advance, |
Hi @Merijn68 |
Hi KTHor2, Thanks for your reply. So Investpy is currently not working due to this error, and there is no solution for this? What do you mean when you say the "current API is protected"? |
You can use |
You can use [investiny] |
There is still yfinance around. Before investpy I was developing X-way scrapping/getting data from different sources (using timeouts to avoid potential bans for API overuse, and DB for caching results locally), and cross checking that data to make sure it's correct... need to resume that project. |
haven't tried scrapping yet. May be the inly safe way ... |
anyone having a hint and/or a function that can download using url such as ... 'https://www.investing.com/equities/ubisoft-historical-data' it seems that we can't pass dates in the url |
You can use the workaround API that I built for this community: http://api.scraperlink.com/investpy/ For example, here's the sample API for stocks: |
webdevzilla, well done! |
hi, still having issues. import investiny i get "ConnectionError: Request to Investing.com API failed with error code: 403."** |
Thks ! Great. how do you handle it back to python ? url = "http://api.scraperlink.com/investpy/[email protected]&type=historical_data&product=stocks&country=united%20states&symbol=TSLA&from_date=11/14/2022&to_date=11/15/2022" can't manage to access to individual fields. {"data":[{"direction_color":"greenFont","rowDate":"Nov 15, 2022","rowDateRaw":1668470400,"rowDateTimestamp":"2022-11-15T00:00:00Z","last_close":"194.42","last_open":"195.88","last_max":"200.82","last_min":"192.06","volume":"90.86M","volumeRaw":90859000,"change_precent":"1.82","last_closeRaw":"194.41999816894531","last_openRaw":"195.88000488281250","last_maxRaw":"200.82369995117188","last_minRaw":"192.05999755859375","change_precentRaw":1.8172303095892082},{"direction_color":"redFont","rowDate":"Nov 14, 2022","rowDateRaw":1668384000,"rowDateTimestamp":"2022-11-14T00:00:00Z","last_close":"190.95","last_open":"192.77","last_max":"195.73","last_min":"186.34","volume":"91.85M","volumeRaw":91846000,"change_precent":"-2.56","last_closeRaw":"190.94999694824219","last_openRaw":"192.77000427246094","last_maxRaw":"195.72999572753906","last_minRaw":"186.33999633789062","change_precentRaw":-2.561618738169708}],"summary":{"last_highest":"200.82","last_lowest":"186.34","last_difference":"14.48","last_avarage_total":"192.68","last_change_percent":"-0.79"}} |
use json to parse and deserialize the response into an object. |
Thks. For those who may be interested. response = requests.get(url) |
Thanks, but can I use your tool to get the economic calendar? I tried but didn't succeed:
response:
I'm not sure if this response is from your tool (looks like it) or from investing.com. Now I'm lost because investiny isn't capable of getting the economic calendar. |
Max retries exceeded with url investing.com with scraperlink |
I use 2,5 seconds. 2 seconds between each request may work: |
It shouldn't be happening. Can you contact me the next time it happens? I am guessing the issue was with Investing.com downtime. |
Hi everyone. |
I used 15 seconds and was going smoooth (slow but smooth) |
Thanks a lot for this :) |
However, after using few times, I get below error msg. Error message : Expecting value: line 1 column 1 (char 0) |
I don't think that error is from me. What's the query you're using? |
Ah it started working again. Thanks :) |
Hello, I am accessing the investing AJAX server via a POST command via R. Regards Wim Hello Wim, Thank you for contacting us. At the moment [Investing.com] does not have any support for access of services from R or other python editions. Also API and scraping are not allowed. Our tool monitors for these and blocks the account. You can use the services on Specified browsers like chrome, edge, safari. Regards, |
Code-
Error-
The text was updated successfully, but these errors were encountered: