回复 13# lpxx
这个有问题我是知道的,因为新浪微博有体验版和标准版,默认是标准版,而我用的是体验版,所以出错了。
把$weibo = BinaryToString(InetRead('http://weibo.com', 1), 4)
GUIDelete ($Form1)
$nick = StringRegExp($weibo,"\[\'nick\'\] = \'(.*)\'\;",3) ;;名字
$sex = StringRegExp($weibo,"\$CONFIG\[\'sex\'\] \= '(.*)\'\;",3) ;;性别
$sex1 = StringReplace(StringReplace($sex[0],"m","男"),"f","女") ;;m为男,f为女
$domain = StringRegExp($weibo,"domain\'\] = \'(.*)\'\;",3) ;;bygeary
$wei = StringRegExp($weibo,'<strong node-type="weibo">(.*)</strong>',3) ;;微博条数
$fans = StringRegExp($weibo,'<strong node-type="fans">(.*)</strong>',3) ;;粉丝
$follow = StringRegExp($weibo,'<strong node-type="follow">(.*)</strong>',3) ;;关注
替换成下面代码,应该就可以了。 $weibo = BinaryToString(InetRead('http://weibo.com', 1), 4)
$xinxi = StringReplace(Encode2Unicode($weibo), "", "")
GUIDelete ($Form1)
$nick = StringRegExp($xinxi,"\[\'nick\'\] = \'(.*?)\'\;",3) ;;名字
$sex = StringRegExp($xinxi,"\$CONFIG\[\'sex\'\] \= '(.*?)\'\;",3) ;;性别
$sex1 = StringReplace(StringReplace($sex[0],"m","男"),"f","女") ;;m为男,f为女
$domain = StringRegExp($xinxi,"domain\'\] = \'(.*?)\'\;",3) ;;bygeary
$wei = StringRegExp($xinxi,'<strong node-type="weibo">(.*?)</strong>',3) ;;微博条数
$fans = StringRegExp($xinxi,'<strong node-type="fans">(.*?)</strong>',3) ;;粉丝
$follow = StringRegExp($xinxi,'<strong node-type="follow">(.*?)</strong>',3) ;;关注
直接登录就出错的,你再试下看,因为我发现在网速慢的时候会出错,因为是读取源码再匹配的,可能读取不到源码。 |