alvarobartt / investpy

Financial Data Extraction from Investing.com with Python
https://investpy.readthedocs.io/
MIT License
1.59k stars 375 forks source link

Stocks missing #466

Closed grafspot closed 2 years ago

grafspot commented 2 years ago

It seems like the scraper is not fetching companies that have been recently listed via IPO within the last year or so. An example is Truecaller in Sweden (https://www.investing.com/equities/truecaller-ab). The equity is searchable on investing.com so it should be available?

Am I the only one experiencing this issue and is there a way to fix it?

alvarobartt commented 2 years ago

Hi @grafspot, as I've mentioned many times, currently the static files available in investpy are not consistent enough since those haven't been updated in a while!

So on, the current solution to find the missing financial products as well as to ensure the consistency overall is to use investpy.search_quotes as described in the Wiki at https://github.com/alvarobartt/investpy/wiki/investpy.search_quotes() and in the Documentation at https://investpy.readthedocs.io/_info/usage.html#search-live-data.

Here's an example of how to look for the stock you want! :+1:

import investpy

search_result = investpy.search_quotes(text="truecaller-ab", countries=["sweden"], products=["stocks"], n_results=1)
print(search_result)
recent_data = search_result.retrieve_recent_data()
historical_data = search_result.retrieve_historical_data(from_date="01/01/2020", to_date="01/01/2021")
alvarobartt commented 2 years ago

🎉 FYI I'm already preparing investpy v2.0 with some new features and also looking forward to the deprecation of the static files that need to be updated with a high frequency and that's not as easy as it looks since Investing.com seems to have some severe limitations regarding web-scrapers. So on, at some point, you shouldn't run into issues like this as investpy should be fully aligned with Investing.com.