复制代码 代码如下:
__author__ = 'clownfish'
#coding:utf-8
import urllib2,urllib,cookielib,json
username = "快盘用户名"
password = "快盘密码"
class sign(object):
username = ''
password = ''
#登录显示页面
indexurl = 'https://www.kuaipan.cn/account_login.htm'
#登录的form表单url
loginurl = 'https://www.kuaipan.cn/index.php?ac=account&op=login'
#签到的真正url
signurl = 'http://www.kuaipan.cn/index.php?ac=common&op=usersign'
def __init__(self,username,password):
self.username = username
self.password = password
def login(self):
cj = cookielib.CookieJar()
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
urllib2.install_opener(opener)
print "打开登录页面"
try:
urllib2.urlopen(self.indexurl)
post_data = {'username':self.username,'userpwd':self.password,'isajax':'yes'}
req=urllib2.Request(self.loginurl,urllib.urlencode(post_data))
except Exception, e:
print "网络链接错误"
return False
print "登录成功,准备签到!"
response = urllib2.urlopen(req)
login=response.read()
return login
def sign(self):
response = urllib2.urlopen(self.signurl)
sign = response.read()
l = json.loads(sign)
if (l and l['state'] == 1) or \
(l and 0 == l['state'] and l['increase'] * 1 == 0 and l['monthtask'].M900 == 900):
print "恭喜你签到成功!"
k = l['increase']*1
m = l['rewardsize'] * 1
if (k == 0 and l['monthtask'].M900 == 900):
print "本月签到积分已领取完成"
else:
print "签到奖励积分:%s" % (k)
if m == 0:
print "手气太不好了!奖励 0M 空间"
else:
print "签到奖励空间:%s" % (m)
else:
if (l['state'] == -102):
print "今天您已经签到过了"
else:
print "签到失败,遇到网络错误,请稍后再试!"
return sign
if __name__ == "__main__":
sign = sign(username,password)
if sign.login():
sign.sign()
金山快盘,签到程序
更新日志
- 小骆驼-《草原狼2(蓝光CD)》[原抓WAV+CUE]
- 群星《欢迎来到我身边 电影原声专辑》[320K/MP3][105.02MB]
- 群星《欢迎来到我身边 电影原声专辑》[FLAC/分轨][480.9MB]
- 雷婷《梦里蓝天HQⅡ》 2023头版限量编号低速原抓[WAV+CUE][463M]
- 群星《2024好听新歌42》AI调整音效【WAV分轨】
- 王思雨-《思念陪着鸿雁飞》WAV
- 王思雨《喜马拉雅HQ》头版限量编号[WAV+CUE]
- 李健《无时无刻》[WAV+CUE][590M]
- 陈奕迅《酝酿》[WAV分轨][502M]
- 卓依婷《化蝶》2CD[WAV+CUE][1.1G]
- 群星《吉他王(黑胶CD)》[WAV+CUE]
- 齐秦《穿乐(穿越)》[WAV+CUE]
- 发烧珍品《数位CD音响测试-动向效果(九)》【WAV+CUE】
- 邝美云《邝美云精装歌集》[DSF][1.6G]
- 吕方《爱一回伤一回》[WAV+CUE][454M]