#include <Inet.au3>
$a=_INetGetSource("http://detail.tmall.com/item.htm?id=12224681317")
$name=StringRegExp($a, '颜色分类:(.*?)\</li>', 3)
MsgBox(0,"",Encode2Unicode($name[0]))
$name=StringRegExp($a, '产品名称:(.*?)\</li>', 3)
MsgBox(0,"",Encode2Unicode($name[0]))
$name=StringRegExp($a, '材质:(.*?)\</li>', 3)
MsgBox(0,"",Encode2Unicode($name[0]))
Func Encode2Unicode($EncodedString, $qz = '', $hz = ';')
;将 Unicode UTF 编码还原为字符 By afan
Local $Unicode, $i, $S2H, $Us
$S2H = StringRegExp($EncodedString, $qz & '(\w{4,5})' & $hz, 3)
If @error Then Return $EncodedString
For $i = 0 To UBound($S2H) - 1
$Us = ChrW(($S2H[$i]))
$Unicode = StringReplace($EncodedString, $qz & $S2H[$i] & $hz, $Us, 1)
$EncodedString = $Unicode
Next
$Unicode=StringReplace($Unicode,' ', " ")
Return $Unicode
EndFunc ;==>Encode2Unicode
|