#include <Array.au3>
$oHTTP = ObjCreate("microsoft.xmlhttp")
$oHTTP.open("get", "http://www.360buy.com/products/670-671-2694.html", False)
$oHTTP.send()
$source1 = $oHTTP.responsetext
$skuid = StringRegExp($source1, "sku='(\d+)'", 3)
Dim $array[UBound($skuid)][2]
For $i = 0 To UBound($skuid) - 1
$oHTTP.open("get", "http://www.360buy.com/product/" & $skuid[$i] & ".html", False)
$oHTTP.send()
$source2 = $oHTTP.responsetext
$price = StringRegExp($source2, "我在@京东商城 发现了一个非常不错的商品:(.+),京东价:¥(\d+\.\d+)", 3)
$array[$i][0] = $price[0]
$array[$i][1] = $price[1]
Next
_ArrayDisplay($array)
|