<٪
Hehe = Hello ("http://mmsg.qq.com/cgi-bin/gddylist؟type=13&sort=1&page=3" ، "<html> ،" </html> "،".*(<tdwidth = "" 35 ٪ "" bgColor = ""#[/dabcde] {6} ""> (.*) </td>) [./ n]*"،" <fontstyle = "" font-size: "
الرد. writehehe
FunctionHello (Strurl ، Strstart ، Strend ، Gatrn ، Remstr)
str = getBody (Strurl)
str = mymid (Str ، Strstart ، Strend)
str = replaceTest (patrn ، replstr ، str)
مرحبا = str
الوظيفية
FunctionMymid (Str ، Strstart ، Strend)
ifstrstart = "" ثم
أنا = 0
آخر
i = instr (str ، strstart)
Endif
ifstrend = "" ثم
J = Len (Str)
آخر
J = Instr (I ، Str ، Strend)
Endif
mymid = mid (str ، i ، j-i+1)
الوظيفية
FunctionReplacetest (Gatrn ، Replstr ، Str1)
Dimregex ، المباراة ، المباريات
setRegex = NewRegexp
regex.pattern = جالن
regex.ignorecase = صحيح
regex.global = صحيح
setMatches = regex.execute (Str1)
foreachMatchinMatches
replaceTest = replacetest®ex.replace (match.value ، replstr)
التالي
الوظيفية
FunctionGetBody (url)
setObjxml = createObject ("microsoft.xmlhttp")
withobjxml
.OPEN "Get" ، url ، false ، "" ، ""
.يرسل
getBody = .responseBody
endwith
getBody = bytestobstr (getBody ، "GB2312")
setObjxml = لا شيء
الوظيفية
functionByTestobstr (strbody ، codebase)
setObjStream = server.createBject ("Adodb.stream")
withobjstream
.type = 1
. وضع = 3
.يفتح
. WriteStrbody
.position = 0
.type = 2
.charset = codebase
bytestobstr = .readtext
.يغلق
endwith
setObjStream = لا شيء
الوظيفية
٪>
: :
Hehe = Hello ("http://list.mp3.baidu.com/song/a.htm" ، "<tablewidth =" "90 ٪" "border =" "0" "align =" "center" "cellpadding =" "3" "" cellpacing = "" 0 "" "bgcolor =" " ، "<fivalign = center>" ، ".*(<tdwidth =" "20 ٪" "> <hhref =".*/.