- PrivateDeclareFunctionMultiBytetoWideCharLib"kernel32"(ByValCodePageAsLong,ByValdwFlagsAsLong,ByVallpMultiByteStrAsLong,ByValcchMultiByteAsLong,ByVallpWideCharStrAsLong,ByValcchWideCharAsLong)AsLong
- PrivateConstCP_UTF8=65001
- FunctionUtf8ToUnicode(ByRefUtf()AsByte)AsString
- DimlRetAsLong
- DimlLengthAsLong
- DimlBufferSizeAsLong
- lLength=UBound(Utf)-LBound(Utf)+1
- IflLength<=0ThenExitFunction
- lBufferSize=lLength*2
- Utf8ToUnicode=String$(lBufferSize,Chr(0))
- lRet=MultiBytetoWideChar(CP_UTF8,VarPtr(Utf(0)),lLength,StrPtr(Utf8ToUnicode),lBufferSize)
- IflRet<>0Then
- Utf8ToUnicode=Left(Utf8ToUnicode,lRet)
- EndIf
- EndFunction
- FunctionSourcecodeofXunleizixun(ByValmenuindexAsLong)AsString
- Dimb()AsByte,indexurl(5)AsString
- IfNotmenuindexLike"[0-5]"ThenExitFunction
- indexurl(0)="http://recommend.xunlei.com/desknews_v2_game.html"'0---游戏
- indexurl(1)="http://recommend.xunlei.com/desknews_v2_ent.html"'1---娱乐
- indexurl(2)="http://biz5c.sandai.net/desktopnews/iframe/hot_14.htm"'2---婚恋
- indexurl(3)="http://www.eachnet.com/landing/xunlei08_3.html"'3---网购
- indexurl(4)="http://biz5c.sandai.net/desktopnews/iframe/hot_2.htm"'4---财经
- indexurl(5)="http://biz5c.sandai.net/desktopnews/iframe/hot_3.htm"'5---IT
- WithCreateObject("Msxml2.XMLHTTP")
- .Open"GET",indexurl(menuindex),False
- .Send
- b=.ResponseBody
- EndWith
- SourcecodeofXunleizixun=Utf8ToUnicode(b)
- EndFunction
- SubGetxunlei()
- Debug.PrintSourcecodeofXunleizixun(1)'娱乐资讯
- EndSub
原文地址:https://www.jb51.cc/vb/263346.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。