Posted in Python onFebruary 10, 2013
import time,datetime import urllib2 def chk_qq(qqnum): chkurl = 'http://wpa.qq.com/pa?p=1:'+`qqnum`+':1' a = urllib2.urlopen(chkurl) length=a.headers.get("content-length") a.close() print datetime.datetime.now() if length=='2329': return 'Online' elif length=='2262': return 'Offline' else: return 'Unknown Status!' qq = 12345678 stat = chk_qq(qq) print `qq` + ' is ' + stat
使用python检测手机QQ在线状态的脚本代码
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@