Compare commits

...
1 Commits
Author SHA1 Message Date
cmallwitz 28ae9efa74 Fix for FT redirect to unencoded URLs 2024-09-02 20:37:37 +01:00
3 changed files with 11 additions and 2 deletions
+3 -1
View File
@@ -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:
+1 -1
View File
@@ -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"
+7
View File
@@ -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))