mirror of
https://github.com/cmallwitz/Financials-Extension.git
synced 2026-08-27 18:14:10 -05:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
28ae9efa74 |
+3
-1
@@ -16,6 +16,7 @@ import pathlib
|
||||
import random
|
||||
import select
|
||||
import urllib.request
|
||||
import urllib.parse
|
||||
from http import cookiejar
|
||||
from http.client import HTTPConnection, HTTPSConnection, HTTPException
|
||||
|
||||
@@ -162,7 +163,8 @@ class BaseClient:
|
||||
while 300 <= self.response.status < 400 and self.redirect_count >= 0:
|
||||
|
||||
self.redirect_count -= 1
|
||||
location = self.response.getheader('Location')
|
||||
location = str(self.response.getheader('Location'))
|
||||
location = location.replace(' ', '%20') # FT bug workaround - this should not be necessary
|
||||
|
||||
if location and redirect:
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ import os
|
||||
cur_dir = os.getcwd()
|
||||
|
||||
addin_id = "com.financials.getinfo"
|
||||
addin_version = "3.6.2"
|
||||
addin_version = "3.6.3"
|
||||
addin_displayname = "Financial Market Extension"
|
||||
addin_publisher_link = "https://github.com/cmallwitz/Financials-Extension"
|
||||
addin_publisher_name = "The Publisher"
|
||||
|
||||
@@ -309,6 +309,13 @@ class Test(unittest.TestCase):
|
||||
self.assertEqual(str, type(s), 'test_DK_equity INDUSTRY {}'.format(s))
|
||||
self.assertEqual('Pharmaceuticals and Biotechnology', s, 'test_DK_equity INDUSTRY {}'.format(s))
|
||||
|
||||
def test_SE_equity(self):
|
||||
s = financials.getRealtime('ACRI A:STO', 'name', 'FT')
|
||||
self.assertEqual('Acrinova AB (publ)', s, 'test_SE_equity NAME {}'.format(s))
|
||||
|
||||
s = financials.getRealtime('SE0015660014', 'name', 'FT')
|
||||
self.assertEqual('Acrinova AB (publ)', s, 'test_SE_equity NAME {}'.format(s))
|
||||
|
||||
def test_TY_equity(self):
|
||||
s = financials.getRealtime('6503:TYO', 'OPEN', 'FT')
|
||||
self.assertEqual(float, type(s), 'test_TY_equity OPEN {}'.format(s))
|
||||
|
||||
Reference in New Issue
Block a user