- ©«¤l
- 12
- ¥DÃD
- 3
- ºëµØ
- 0
- ¿n¤À
- 64
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Office2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- Taipei
- µù¥U®É¶¡
- 2012-2-17
- ³Ì«áµn¿ý
- 2017-9-19
|
¦^´_ 1# hipper68
±q jsp ¸Ì±§ä¨ì¥t¤@Óºô§}, Code ¦p¤U:
Sub sbManualRefresh()
'Dim HttpReq As New MSXML2.XMLHTTP30
Dim myUrl As String
Dim HttpReq As Object
Dim rt As Integer
Set HttpReq = CreateObject("MSXML2.XMLHTTP.3.0")
'Set HttpReq = CreateObject("Microsoft.XMLHTTP")
myUrl = "http://mis.twse.com.tw/stock/api/getStatis.jsp?ex=tse&delay=0&_=" & Str(Int(Format(Now, "General Number") * 10000000))
'myUrl = "http://mis.twse.com.tw/stock/api/getStatis.jsp?ex=tse&delay=0&_=" & Str(1505227799001#)
MsgBox myUrl
HttpReq.Open "GET", myUrl, False
HttpReq.send
If HttpReq.readyState = 4 Then
Call fetchTesData(HttpReq.responseText)
G_NEXTTIME = Now() + TimeValue("00:00:00" & G_INTERVAL)
'MsgBox "complete"
End If
End Sub
n¦bì¨Óªº«á±¥[¤W " &_[®É¶¡¼ÐÅÒ]"
¥[¤F¤§«á, ¨Ï¥Î python ´N¥i¥H§ì¨ì¥¿½TªºÈ...
¦ý¬O¤W±ªº code ´N§ì¤£¨ì....
½Ð°Ý¦U¦ì¤j¤j...¦³¸Ñªk¶Ü??
·PÁÂ!!! ·PÁÂ!!!
Python ªº code ¤jP¦p¤U (¨Ï¥Îrequests ®M¥ó) :
STOCKINFO_URL = 'http://mis.twse.com.tw/stock/api/getStatis.jsp?ex=tse&delay=0&_={time}'
page = requests.get( STOCKINFO_URL.format(time=int(time.time()) * 1000))
open('tse_test_0912.csv','wb').write( page.content) |
-
-
VBA.png
(28.35 KB)
¤U¸üµ²ªG
|