<%
hehe = Bonjour ("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: 9pt; "" Color = Blue> 2 $ </font> <br> ")
réponse.WRITEHEHE
FunctionHello (Strurl, Strstart, Strand, Patn, REPTSTR)
Str = getbody (strurl)
Str = Mymid (str, strStart, Sdrend)
Str = remplacest (patn, repstr, str)
Bonjour = str
Finition de fin
Fonctionmymid (Str, StrStart, Sdrend)
IfStrStart = "" alors
i = 0
Autre
i = instr (str, strStart)
Endire
IfStrend = "" alors
J = len (str)
Autre
j = instr (i, str, Strend)
Endire
Mymid = mid (str, i, j-i + 1)
Finition de fin
FunctionReplaceTest (Patn, REPLSTR, STR1)
Dimregex, Match, matchs
SetRegex = newRegexp
regex.Pattern = Patn
regex.ignorecase = true
regex.global = true
Setmatches = regex.execute (str1)
Foreachmatchinmatches
RemplaceTest = remplaceTest®Ex.replace (Match.Value, REPTSTR)
Suivant
Finition de fin
FunctionGetBody (URL)
SetObjxml = createObject ("Microsoft.xmlhttp")
Withobjxml
.Open "Get", URL, false, "", ""
.Envoyer
Getbody = .Responsebody
Fin
GetBody = byTestObstr (getbody, "gb2312")
SetObjxml = rien
Finition de fin
FunctionByTestObstr (Strbody, CodeBase)
SetObjstream = server.createObject ("adodb.stream")
Withobjstream
.Type = 1
.Mode = 3
.Ouvrir
.Writestry
.Position = 0
.Type = 2
.Charset = CodeBase
ByTestObstr = .readText
.Fermer
Fin
SetObjstream = rien
Finition de fin
%>
:
hehe = Bonjour ("http://list.mp3.baidu.com/song/a.htm", "<table , "<Divalign = Center>", ". * (<Tdwidth =" "20%" "> <href =" ". * /. Htm" "Target = _blank>) (. *) (</a> </td>) [./ n] *", "<fontstyle =" "Font-Size: 9pt;" "Color = Blue> 2 $