toomore / grs

📈 台灣上市上櫃股票價格擷取(Fetch Taiwan Stock Exchange data)含即時盤、台灣時間轉換、開休市判斷。
http://pypi.python.org/pypi/grs
MIT License
430 stars 164 forks source link

擷取華研即時股價出現錯誤?? #39

Closed blackbryant closed 7 years ago

blackbryant commented 7 years ago

Traceback (most recent call last): File "E:/git/stock/stockgrs.py", line 118, in realtime_stock = RealtimeOTC('8446') # 擷取華研即時股價 File "C:\Python27\lib\site-packages\grs\realtime2.py", line 146, in init super(RealtimeOTC, self).init(no, date) File "C:\Python27\lib\site-packages\grs\realtime2.py", line 35, in init self.result = URL.request('GET', STOCKPATH % params) File "C:\Python27\lib\site-packages\urllib3\request.py", line 66, in request urlopen_kw) File "C:\Python27\lib\site-packages\urllib3\request.py", line 87, in request_encode_url return self.urlopen(method, url, extra_kw) File "C:\Python27\lib\site-packages\urllib3\connectionpool.py", line 696, in urlopen release_conn=release_conn, **response_kw) File "C:\Python27\lib\site-packages\urllib3\connectionpool.py", line 549, in urlopen raise HostChangedError(self, url, retries) urllib3.exceptions.HostChangedError: HTTPConnectionPool(host='mis.tse.com.tw', port=80): Tried to open a foreign host with url: http://1.1.1.8

toomore commented 7 years ago

@bryan721105 即時資訊目前證交所無法取得,感謝回報!