cmallwitz / Financials-Extension

Extension for LibreOffice Calc to access stock market data
Other
137 stars 17 forks source link

Handle the case where there is a data-value but no value #99

Closed beckjake closed 3 months ago

beckjake commented 3 months ago

This fixes the #N/A issue described in #98 for me.

Locally, I applied this and then added an extra patch doing:

if value and not default(d.attrib, 'value'):
     logger.error('found data-value instead of value!')

And I see that from time to time in my extension.log file, so I am pretty confident my change is triggering and I'm not just continuously getting lucky.

I don't use futures, so I can't speak to the second instance, but I assume it's the same so I changed that as well.

cmallwitz commented 3 months ago

Happy to merge this. I'm just wondering - sometimes data is in "data", sometimes in "data-value" node ? Would you have an saved example-HTML file? I searched mine and I never see "data-value"...

beckjake commented 3 months ago

I had to gzip this so github would accept it, but here's an AAPL example from just a couple minutes ago yahoo-AAPL.html.gz