复制代码 代码如下:
__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()

华山资源网 Design By www.eoogi.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
华山资源网 Design By www.eoogi.com

稳了!魔兽国服回归的3条重磅消息!官宣时间再确认!

昨天有一位朋友在大神群里分享,自己亚服账号被封号之后居然弹出了国服的封号信息对话框。

这里面让他访问的是一个国服的战网网址,com.cn和后面的zh都非常明白地表明这就是国服战网。

而他在复制这个网址并且进行登录之后,确实是网易的网址,也就是我们熟悉的停服之后国服发布的暴雪游戏产品运营到期开放退款的说明。这是一件比较奇怪的事情,因为以前都没有出现这样的情况,现在突然提示跳转到国服战网的网址,是不是说明了简体中文客户端已经开始进行更新了呢?