本帖最后由 afan 于 2011-12-31 14:55 编辑
回复 13# lsszmj
可以不用临时文件;
#include <INet.au3>
$Str = BinaryToString(_INetGetSource($Url, 0), 4)
另外可以不用ReDimFunc _GetId($HTMLSource)
Local $a_Id = StringRegExp($HTMLSource, _
"(?U)名[::]\h*?(.+)<.+[::]\h*?(.+)(?: )*\h*<", 3)
Local $a_Time = StringRegExp($HTMLSource, _
'#3366ff">(.{10}) ', 3)
;_ArrayDisplay($a_Id, "$a_Id")
;_ArrayDisplay($a_Time, "$a_Time")
Local $N = 3, $c = UBound($a_Id)
Local $a_IdInfo[$c / 2 + 1][$N] = [[$c / 2]], $p = 1
For $i = 1 To $c - 1 Step 2
$a_IdInfo[$p][0] = $a_Id[$i - 1]
$a_IdInfo[$p][1] = $a_Id[$i]
If StringInStr($a_Id[$i-1], "EAV") Then
$a_IdInfo[$p][2] = $a_Time[1]
Else
$a_IdInfo[$p][2] = $a_Time[0]
EndIf
;MsgBox(0,$i,$a_Id[$i])
$p += 1
Next
_ArrayDisplay($a_IdInfo, "$a_IdInfo")
EndFunc ;==>_GetId
|