mirror of
https://github.com/cmallwitz/Financials-Extension.git
synced 2026-08-26 18:14:11 -05:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aa20845ae4 |
Binary file not shown.
@@ -238,6 +238,10 @@ class Yahoo(BaseClient):
|
||||
if match:
|
||||
tick[Datacode.CURRENCY] = match.group(1)
|
||||
|
||||
# fallback for yield on US mutual funds and ETFs, which is in different field
|
||||
if not tick[Datacode.DIV_YIELD]:
|
||||
tick[Datacode.DIV_YIELD] = float(raw(summaryDetail, 'yield'))
|
||||
|
||||
name = price['longName'] or price['shortName']
|
||||
if name:
|
||||
tick[Datacode.NAME] = html.unescape(str(name))
|
||||
|
||||
@@ -14,7 +14,7 @@ import os
|
||||
cur_dir = os.getcwd()
|
||||
|
||||
addin_id = "com.financials.getinfo"
|
||||
addin_version = "3.0.2"
|
||||
addin_version = "3.0.3"
|
||||
addin_displayname = "Financial Market Extension"
|
||||
addin_publisher_link = "https://github.com/cmallwitz/Financials-Extension"
|
||||
addin_publisher_name = "The Publisher"
|
||||
|
||||
@@ -123,6 +123,9 @@ class Test(unittest.TestCase):
|
||||
s = financials.getRealtime('VFIAX', Datacode.LAST_PRICE_TIME.value, 'YAHOO')
|
||||
self.assertEqual(str, type(s), 'test_realtime_US_mutuals LAST_PRICE_TIME {}'.format(s))
|
||||
|
||||
s = financials.getRealtime('VFIAX', Datacode.DIV_YIELD.value, 'YAHOO')
|
||||
self.assertTrue(testutils.is_positive_float(s), 'test_realtime_US_mutuals DIV_YIELD {}'.format(s))
|
||||
|
||||
def test_realtime_US_options(self):
|
||||
|
||||
# symbol from https://finance.yahoo.com/quote/IBM/options?p=IBM
|
||||
|
||||
Reference in New Issue
Block a user