- ©«¤l
- 23
- ¥DÃD
- 0
- ºëµØ
- 0
- ¿n¤À
- 73
- ÂI¦W
- 299
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- Office 2003
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2012-4-21
- ³Ì«áµn¿ý
- 2024-11-28
|
¦^´_ 20# GBKEE
§Úªº¬Owin7 , IE 11 , office2013
¸òno3-taco ¤@¼Ë»Ýn§ï¦¨ E.all.Length >= IIf(i = 0, 415, 135)
¦^´_ 21# no3-taco
«á¨Ó§Ú§ï¦¨ Loop Until InStr(1, E.outerHTML, IIf(i = 0, "00638R", "¹q¤lÃþ¥[ÅvªÑ»ù«ü¼Æ"))¤ñ¸û¨S°ÝÃD
¦^´_ 19# jackyq
¦hÁÂjackyq¤j´£ÂI¡A§Ú¾Ç²ßµ{¦¡ªº¸gÅç¤j³¡¤À³£¬Oºô¸ô¤WGoogle§ì¨Ó¶K¤Wקï¡A¯u¥¿¦Û¤v¼gªº¤£¦h¡A½T¹ê±q¨S»{¯u¦Ò¼{¨ì¸Ó¦p¦ó¼g¤~¯àÅý«áÄòªººûÅ@¤u§@§ó»´ÃP¡AÃö©ó³o¤è±ªº¸gÅç«e½ú¬O§_¥i¥H±ÀÂˬÛÃöªº®ÑÄy©Îºô¯¸¡AÁÙ¬O¦pªG§Ún¥ÎGoogle·j´M³o¤è±ªº¸ê®Æ¸Ó¥Î¤°»ò¼ËªºÃöÁä¦r¡AÁÂÁÂ!
Ãö©ólcctno¤jô©Ò´£ªº°ÝÃD¤@¶}©l¦]¬°±qºô¶ªºì©l½X¬Ý¤£¨ì¸ê®Æ¡A§Ú¤~·Q¥h±NJSON¸ê®Æ¤º®e«²Õ¨Ó¶K¡A®Ú¾Újackyq¤j±zªº«Øij§Ú·QÁÙ¬OÀ³¸Ó¥H GBKEE ª©¥D¤@¶}©l©Ò±Ð¥ÎIE¨Ó§ì¨úªº¤è¦¡³Ì®e©öºûÅ@¡A«á¨Ó§Ú¦³§ä¨ì°ÊºA²£¥Íªººô¶ì©l½X¤~µo²{§Ú°µ¤F¦n¦h¥Õ¤u¡A¥un¦b¶K¤W¤u§@ªí«e±Nºô¶¬ÛÃö¦r¦ê¤º®eק﫲մN¥i¥HÅýt¸¹¥¿±`Åã¥Ü¥X¨Ó¡A¤U±ªºµ{¦¡¬O¥Î GBKEE ª©¥Dì©l½X¨Ó°µ×§ï¡A¦pªG¦³§ó²³æªº¤è¦¡Á٧Ʊæ±z̯à¦h«ü¾É¤@¤U¡AÁÂÁÂ!- Option Explicit
- Sub Ex()
- Dim E As Object, AR(), i As Integer, o As Object, k As Integer
- AR = Array("http://www.yuantaetfs.com/#/RtNav/Index", "http://www.yuantaetfs.com/#/Home/Index")
- 'Ar = Array(ºô§}:§Y®É²bÈ,ºô§}:°ê¤º«ü¼Æ) ºô§}¸m¤J°}¦C
- ActiveSheet.UsedRange.Clear
- For i = 0 To 1
- With CreateObject("InternetExplorer.Application")
- .Visible = True
- .Navigate AR(i)
- Do While .Busy Or .readyState <> 4: DoEvents: Loop
- If i = 0 Then '°ê¤º«ü¼Æ:¤£»Ý«ö¤U¦P·NÁä
- Do
- Set E = .Document.getElementByid("Agree")
- Loop Until Not E Is Nothing
- E.Click
- End If
- Do
- Do
- Set E = .Document.getElementsByTagName("TABLE")(21 + i)
- '§Y®É²bÈ ²Ä21Ó "TABLE" ,'°ê¤º«ü¼Æ ²Ä22Ó "TABLE"
- Loop Until Not E Is Nothing
- 'Loop Until E.all.Length >= IIf(i = 0, 431, 150) '
- Loop Until InStr(1, E.outerHTML, IIf(i = 0, "00638R", "¹q¤lÃþ¥[ÅvªÑ»ù«ü¼Æ")) '§ï¥Î¬ÛÃö¦r¦ê½T»{¬O§_¦³¸ê®Æ
-
- '§R°£¡¶ ¡¿ ²Å¸¹¨Ã¥[¤W¼Æ¦rt¸¹Åã¥Ü
- If 0 = i Then
- For Each o In E.getElementsByClassName("ng-binding upcolor")
- If InStr(1, o.innerText, "¡¶ ¡¿") Then
- o.innerHTML = Mid(o.innerText, 5)
- End If
- Next
- For Each o In E.getElementsByClassName("ng-binding downcolor")
- If InStr(1, o.innerText, "¡¶ ¡¿") Then
- o.innerHTML = "-" & Mid(o.innerText, 5)
- Else
- o.innerHTML = "-" & o.innerText
- End If
- Next
- Else
- For Each o In E.getElementsByClassName("ChangesText2 downcolor")
- k = InStr(1, o.innerText, "(")
- If 0 < k Then
- o.innerHTML = "-" & Mid(o.innerText, 1, k - 1) & "(-" & Mid(o.innerText, k + 1)
- End If
- Next
- End If
- .Document.body.innerHTML = Replace(E.outerHTML, "<span class=""ng-hide"" ng-show=""o.price == 0"">0</span>", "") ' ¥h°£ [§é·¸»ù] ¼Æ¦r«á±¦h¾lªº0
- '.Document.body.innerHTML = E.outerHTML
- 'Stop
- .ExecWB 17, 2 ' Select All
- .ExecWB 12, 2 ' Copy selection
- With ActiveSheet
- .Range("A" & IIf(i = 0, 1, 27)).Select
- .PasteSpecial Format:="HTML", Link:=False, DisplayAsIcon:=False, NoHTMLFormatting:=True
- With .Range(IIf(i = 0, "D16:D17", "C27:C28")).Interior
- .ColorIndex = 35
- .Pattern = xlSolid
- End With
- End With
- .Quit 'Ãö³¬ºô¶
- End With
- Next
- End Sub
½Æ»s¥N½X |
|