本帖最后由 user3000 于 2012-6-5 16:11 编辑
回复 1# ebhb
$sUrl = 'http://www.86zw.net/Html/Book/31/31616/2141321.shtml'
$oHTTP = ObjCreate('microsoft.xmlhttp')
$oHTTP.Open('get', $sUrl, False)
$oHTTP.Send("")
$sText = BinaryToString($oHTTP.responseBody)
$title = StringRegExpReplace($sText, '(?is).+id="TextTitle"[^<>]*>\h*<[^<>]+>([^<>]+)</span>.+', '\1')
$text = StringRegExpReplace($sText, '(?is).+id="BookText"[^<>]*>\h*<[^<>]+>(.+?)</div>.+', '\1')
$text = StringRegExpReplace($Text, '(?i)<br>', @CRLF)
MsgBox(0,$title, $Text)
|