alvarobartt / investpy

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

investpy.get_stock_earnings() broken #361

Open markus080402 opened 3 years ago

markus080402 commented 3 years ago

Hi!

It seems as the new html pages format at investing.com has broken the function investpy.get_stock_earnings(ticker, country) :

>>> investpy.get_stock_earnings(ticker, country)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/...
snip.../.local/lib/python3.6/site-packages/investpy/stocks.py", line 1699, in get_stock_earnings
    raise RuntimeError("ERR#0061: introduced stock has no dividend's data to display.")
RuntimeError: ERR#0061: introduced stock has no dividend's data to display.
>>>

Thanks and regards, Markus

alvarobartt commented 3 years ago

Hi @markus080402, can you please share the exact investpy call that you are using (including the parameters) so that I can reproduce it?

As I've just run some manual tests and the pytest ones and everything seems to be working fine as I just mentioned in #355 ... So maybe the issue is related either with the investpy version that you are using or with the function call!

markus080402 commented 3 years ago

Hi @alvarobartt, running latest version of investpy, here are the example commands:

ticker, country = ('G5EN', 'sweden') investpy.get_stock_earnings(ticker, country)

Thanks and regards, Markus

alvarobartt commented 3 years ago

Thanks! :fire: So... you are using this fork? https://github.com/alvarobartt/investpy/pull/249

As that function is not included in the investpy master branch, so the fork that you are using may be outdated...