alvarobartt / investpy

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

🐛 Fix bug on `investpy.get_cryptos_overview` #455

Closed alvarobartt closed 2 years ago

alvarobartt commented 2 years ago

Sometimes when using investpy.get_cryptos_overview with the parameter n_results set to None, when retrieving all the available cryptos indexed in Investing.com at https://www.investing.com/crypto/currencies, an issue happens while trying to convert both the price and market_cap values for some cryptos.

This issue is due to an Investing.com error while showing the information for those cryptocurrencies, since their values exceed 1M, so that the API doesn't return it in a float-readable format.

It affects the following cryptocurrencies:

One solution could be to just remove the dots of e.g. 1.238.990 and convert it to float just for the cryptocurrencies that we know are failing, but as we're providing information about real data, it's preferable to omit it rather than providing incorrect data.

alvarobartt commented 2 years ago

Note that no one reported this issue! But this had to be solved, since even though this just affects investpy.get_cryptos_overview, as the cryptos that cause this bug are not available at Investing.com (those that don't have a dedicated website at Investing.com, but do appear in the listing of all the cryptocurrencies).

alvarobartt commented 2 years ago

💚 This also fixes the CI build (hopefully)