-
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
🤏🏻 Use investiny
while we fix investpy
!
#611
Comments
❓ How to use it?from investiny import historical)data
data = historical_data(investing_id=6408, from_date="09/01/2022", to_date="10/01/2022")
print(data) 🤔 Q&A
For example, the value
|
Can it be used to get currency crosses ? |
Hi, @andresrogers yes, it can be used for that, if you want to know how, please open a new Q&A discussion at https://github.com/alvarobartt/investiny/discussions/categories/q-a Thanks 🤗 |
I found investiny doesn't work too |
Hi @yanghoonkim it seems that the Investing.com APIs that |
@alvarobartt Not quite sure why there's hesitation to use my solution for now. Here's the API I built specifically for this community: http://api.scraperlink.com/investpy/ Using it in your scripts is just a matter of prefixing your current fetch requests with this: http://api.scraperlink.com/investpy/?email=your@email.com&url= Example: I have also added another option that supports historical data for stocks, cryptos, currencies and bonds:
If anyone needs anything else added, it won't take me more than a few minutes to do it. It works perfectly fine and is better than nothing. |
Hi, |
@webdevzilla could you add all the categories under the markets button? Indices |
@webdevzilla yes, please open up for indices, currencies and commodities, as well. |
This works fine for me with currencies and stocks. But I can't figure out how to make it work for funds. Is this category available too? |
@webdevzilla can you migrate all those discussions/issues related to your project to a repository under your GitHub? Thanks |
Yep, it's all added: http://api.scraperlink.com/investpy/ Here's the sample APIs:
This was only meant to serve as a temporary solution. It wasn't my intention to create a competing repository. If you feel that's appropriate, I can put one together. |
hi @alvarobartt / @webdevzilla , I came to know of this great python module 'investiny' and 'investpy' today, from StackOverflow.com. I tried using it, and keeps getting the dreaded '403' error even though I am a new user. Is this APIscraperLink the only current fix? I have been using python for more than 4 years, but my programming is more in modelling, rather than IT infrastructure coding... |
@alvarobartt any updates from investing.com? I'm mostly interested in the economic calendar. Does your workaround fix that @webdevzilla ? Thanks in advance. |
@webdevzilla I appreciate it! Do you think your solution will still function for another few months in the future? Cause I am worried that it will be blocked again by investing.com and I have to change my code infrastructure once again.... |
Sure, I'll add it. Please email me so that I can update you once added.
Shouldn't have any problems. I am processing millions of queries without issues. |
@webdevzilla I think there might be an issue with bond API endpoints, as the response can't be converted to json. The response text of bond API is in html format instead of dictionary/json format |
Yes, ScraperLink only captures the raw response. It doesn't parse the data. This repository probably has the code for parsing the HTML response into JSON. I can also add parsing to JSON directly, but I'm super bogged down right now. I might need a few days to get to it. If you email me, I can update you once it's added. |
Hi @webdevzilla could you explain how your solution works and share the code for your website and how you implemented it im really curious as to how you did it. It's a really good solution. |
It requires a massive pool of IP addresses. Not sure if I should say more. 🤐 |
@webdevzilla thank you for providing this alternative solution! Really appreciate it!! |
I understand but how do you get around cloudflare haha |
I don't get Cloudflare blocks when using my proxies. |
if u send us your proxies solution may be we can investiny or investpy
…On Thu, Dec 8, 2022 at 2:23 AM webdevzilla ***@***.***> wrote:
I don't get Cloudflare blocks when using my proxies.
—
Reply to this email directly, view it on GitHub
<#611 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHEE5RBA35QIWAWC4JAHU3LWMD2OHANCNFSM6AAAAAAQZ4NRQY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
There wouldn't be a way for me to control where they're used. My proxy pool would get abused to oblivion. The solution I've provided is 100% free and I can presumably make it work forever. In fact, I will probably add backups to it as well, so that even if Investing.com no longer exists, the API will continue working seamlessly. I need this for my own purposes so there's no way I would let it die. |
@webdevzilla so you funnel the requests through your proxies and that's why cloudflare allows the requests? I don't want access to your pools, just wanna understand how it's technically done. |
Yes. |
Is it something like this? https://www.bestproxyreviews.com/how-to-bypass-cloudflare/ |
I have my own pool of proxies. If you want access it, we can work something out. |
@webdevzilla I can't run bonds API endpoint this morning, I also tried the example you gave but no luck, the error message is below: <title>Access denied | www.investing.com used Cloudflare to restrict access</title> <script> |
Fixed. :) |
I was able to get what I needed from investing.com webtools since I pushed my data from investpy to my own local website (flask application). Maybe it helps someone else. It isn't as clean as my original solution, but it gives the data I need. |
Is there anyway you can create an api for scraping the news headlines and content? |
You can use Option #1 to scrape anything: http://api.scraperlink.com/investpy/ |
Hi everyone, I'm Alvaro Bartolome, ML Engineer, open source developer, and the creator of
investpy
. As many of you may already know, Investing.com which is the data source thatinvestpy
uses has recently changed its APIs as well as the protection of those with Cloudflare, which means that the data is not accessible the same way as before. I and other community members are working actively on solving this issue and looking for alternatives to pull the data from Investing.com.Most of the solutions proposed by the community worked at some point, but are now discontinued or no longer working, but one solution proposed by @ramakrishnamekala129 at #610 seems to be working fine and consistently.
So on, I've decided to develop
investiny
in the meantime, so that everyone can pull the data from Investing.com but in a simpler and faster way. Also as Investing.com is changing so many things lately, I decided to create a new repository namedinvestiny
so as to be easily adaptative to changes. Note thatinvestiny
is not a replacement forinvestpy
, just an intermediate solution in the meantime while we solve the current issues withinvestpy
.I'd like all of you to star
investiny
and contribute to it, as the code is much simpler and easy to understand, but it obviously has less functionality, but we'll get there at some point. Also showing me support by starring, liking, retweeting, etc. is much appreciated.Thanks, everyone! 🤗
The text was updated successfully, but these errors were encountered: