-
Notifications
You must be signed in to change notification settings - Fork 381
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
I got a way to access investing without cloudflare u can try it with requests library #610
Comments
in this b12dcd570c91a748a3b7dd4a7ee79167 is just like apitoken once u get it then u access all historical data |
why requests library doesnt work because of http2or3 version in investing protocol thats why we can use CaseInsensitiveDict |
api key generated from md5 format |
Hi, @ramakrishnamekala129 can you elaborate a little bit more on what those parameters in the URL mean? Thanks 🤗
|
|
U can generate any random md5 code for api |
- Add the symbol functionality/interface, namely new classes `Symbol` and `SymbolCollection`. - Remove investpy because it is no longer working, see alvarobartt/investpy#600 and alvarobartt/investpy#610 - Add yfinance / Yahoo Finance support instead (simplifying a number of things in the interfaces such as type_, country and _querytype). - Revamp search interface, now supports filtering and bucketizing, returns Symbol objects. See new `SearchResult` class for more information. - Add much more comprehensive documentation. - Revamp folder structure. - Encapsulate everything related to sources in new `Source` class. All symbols have a `source` attribute now. (`source` attribute is roughly a replacement for the old `type_` attribute.) - Signatures of most/all `price_*` functions changed. - Add a number of types such as `SourceType`, `PriceHistory`, or `PricePoint` to make the code clearer and help with autocomplete suggestions in the IDE.
OK thanks @ramakrishnamekala129 I'll test your proposal and if it works I'll push some changes to the |
I've just tested it and it doesn't work consistently, it works for some requests, but then it stops working... Same as with |
can u share blocking msg |
it is not blocking me
|
Ok, you're right! The error just appears when I try to replace the current time value you mentioned with the current timestamp value, otherwise, it works! I'll probably release something with this patch in the meantime, thanks 🤗 |
As suggested by @ramakrishnamekala129 at alvarobartt/investpy#610 there's another way to access Investing.com historical data, so I've implemented a simple function to pull that data
I've just released |
@ramakrishnamekala129 , I used this snippet, and unfortunately, it just loos with a 403 error code. This is as of 17/11/2022, United Kingdom location. |
Because we used this api that why investing.com close this backend api |
I dont think that is the case. |
import requests
from requests.structures import CaseInsensitiveDict
url = "https://tvc4.investing.com/b12dcd570c91a748a3b7dd4a7ee79167/1664515691/56/56/23/history?symbol=101810&resolution=D&from=1633411692&to=1664515752"
headers = CaseInsensitiveDict()
headers["authority"] = "tvc4.investing.com"
headers["accept"] = "/"
headers["accept-language"] = "en-US,en;q=0.9"
headers["content-type"] = "text/plain"
headers["origin"] = "https://tvc-invdn-com.investing.com"
headers["referer"] = "https://tvc-invdn-com.investing.com/"
headers["sec-fetch-dest"] = "empty"
headers["sec-fetch-mode"] = "cors"
headers["sec-fetch-site"] = "same-site"
headers["user-agent"] = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.102 Safari/537.36"
resp = requests.get(url, headers=headers)
print(resp.status_code)
resp.json()
The text was updated successfully, but these errors were encountered: