Пример #1
0
 def __init__(self,
              Buy_User: User,
              Data_User: User = User(),
              MinTianShu: int = 20,
              MinLiLv: float = 7.7,
              MaxJinE: int = 5):
     self.web = Chrome.WebBrowser(False)
     self.Buy_web = Chrome.WebBrowser()
     self.MinTianShu = MinTianShu
     self.MinLiLv = MinLiLv / 100
     self.MaxJinE = MaxJinE * 10000
     self.Buy_User = Buy_User
     self.Data_User = Data_User
Пример #2
0
 def __init__(self,
              uuid='123457',
              userid='923071',
              sign='396116cde5e191f59aacf9a4a066338d'):
     self.__is_login = False
     self.__resend_num = 0
     self.__web = chrome.WebBrowser(False)
     self.__uuid = uuid
     self.__userid = userid
     self.__sign = sign
     self.__login_data = None
Пример #3
0
    def __login(self):
        self.__web = chrome.WebBrowser(False)
        self.__web.BackWebBrowser.get(
            'http://app.hzedu.gov.cn/api/barq?uuid=%s' % self.__uuid)
        self.__web.GetHtml(
            'https://app.hzedu.gov.cn/api/login?sign=%s&uuid=%s&userid=%s' %
            (self.__sign, self.__uuid, self.__userid))
        self.__login_data = self.__web.GetJson(
            'http://app.hzedu.gov.cn/api/asklogin?uuid=%s' % self.__uuid)
        token = 'eyJqdGkiOiJqd3RfbXljbGFzcyIsImlhdCI6MTU3NzI4Mjg5Miwic3ViIjoie1wiYXBwaWRcIjoxMDMzLFwiZGF0ZWNyZWF0ZWRcIjpcIlwiLFwiaGVhZHBvcnRyYWl0XCI6XCJcIixcImltdG9rZW5cIjpcIjBmZjQ1YzE4ZGRlZDk2ZGFiNzhkYjQxNWJjYzIzZTBkXCIsXCJtb2JpbGVcIjpcIjE4NjU4MTgxMzA2XCIsXCJuaWNrbmFtZVwiOlwi6K645aea6b6ZXCIsXCJwYXNzd29yZFwiOlwiMDY3ZWYxMzJkOWI4ZjlmN2MyY2NkMjI2OGJhNmE3MmJcIixcInBlb3BsZWlkXCI6NDI0NzM2LFwicG9ydGFsc1wiOlwiXCIsXCJxcmNvZGV1cmxcIjpcImh0dHBzOi8vYXBwLmh6ZWR1Lmdvdi5jbi91L2NjMjIyMDgyMDJiNWEwNGFcIixcInNhbHRcIjpcIjUwZjQ2YTg3NGM3NDY1ZjU5OGQzNTU3YjMyMDRhODMyXCIsXCJzZXR0aW5nc1wiOjAsXCJzb3VyY2Vjb2RlXCI6XCJcIixcInN0YXR1c1wiOjEsXCJ1c2VyaWRcIjo5MjMwNzEsXCJ1c2VybmFtZVwiOlwiXCJ9IiwiZXhwIjoxNTc3MjkwMDkyfQ.LPVntTS6n7tdGXO1SpXFOm3sRh1FaHxK6GIB8Q0onDM'

        self.__web.BackWebBrowser.headers['x-access-token'] = token
        self.__is_login = True
        print('登录成功')
Пример #4
0
class ZheJin:
    UserName = "******"
    PassWord = "******"
    JYPW = "ZWJkMmE5MDI4MTM0ODllN2ZmMDY2MjE2N2MyNGUyMzE=1"
    Web = pyChrome.WebBrowser(False)
    LoginUrl = "https://me.zjfae.com/ife/azj/pbaft.do?fh=VAFTAZJ000000J00&p=and&pbname=PBAPP_login&registrationId" \
               "=100d855909770e4c2b9&clientOsver=8&platform=android&appVersion=2.1.6.48&deviceModal=DUK-AL20&deviceNo" \
               "=48a5fa0ca78a0981&userid=13067764287&ReqTime=1518173832200 "
    ListUrl = "https://me.zjfae.com/ife/mzj/pbife.do?fh=VREGMZJ000000J00&p=and&pbname" \
              "=PBIFE_prdtransferquery_prdQueryTransferOrderListNew&clientOsver=8&platform=android&appVersion=1.6.43" \
              "&deviceModal=DUK-AL20&deviceNo=48a5fa0ca78a0981&userid=13067764287&ReqTime=1518174934516 "
    LiuShuiUrl = "https://me.zjfae.com/ife/mzj/pbife.do?fh=VREGMZJ000000J00&p=and&pbname=PBIFE_trade_queryPayInit" \
                 "&clientOsver=8&platform=android&appVersion=2.1.6.48&deviceModal=DUK-AL20&deviceNo=48a5fa0ca78a0981" \
                 "&userid=13067764287&ReqTime=1518175628498 "
    BuyUrl = 'https://me.zjfae.com/ife/mzj/pbife.do?fh=VREGMZJ000000J00&p=and&pbname=PBIFE_trade_transferOrder' \
             '&clientOsver=8&platform=android&appVersion=2.1.6.48&deviceModal=DUK-AL20&deviceNo=48a5fa0ca78a0981&userid' \
             '=13067764287&ReqTime=1518175646587 '

    @classmethod
    def login(cls):
        cls.Web.timeout = 10
        data = {
            "username": cls.UserName,
            "password": cls.PassWord,
            "loginMethod": "0",
            "needValidateAuthCode": "0",
            "authCode": "0",
            "isOpenGpwd": "0"
        }
        cls.Web.BackWebBrowser.headers.setdefault(
            "Content-Type", "application/json;charset=UTF-8")
        rt = cls.Web.PostJson(cls.LoginUrl, json.dumps(data))
        if rt["body"]["returnCode"] == "0000":
            return True
        else:
            raise Exception(rt["body"]["returnMsg"])

    @classmethod
    def loadlist(cls):

        data = {
            "pageIndex": "1",
            "pageSize": "50",
            # "uuids": "",
            # 5-20w
            "uuids": "1006-2016-",
            "productName": ""
        }
        rt = cls.Web.PostJson(cls.ListUrl, json.dumps(data))
        if rt["body"]["returnCode"] == "0000":
            return rt["body"]["data"][
                "productTradeInfoList"] if 'productTradeInfoList' in rt[
                    'body']["data"] else []
        else:
            raise Exception(rt["body"]["returnMsg"])

    @classmethod
    def liushui(cls, data, JinE: int):
        data = {
            "productCode": data["delegationCode"],
            "delegateNum": JinE * 10000,
            "payType": "transferPay",
            "orderType": ""
        }
        rt = cls.Web.PostJson(cls.LiuShuiUrl, json.dumps(data))
        if rt["body"]["returnCode"] == "0000":
            return rt["body"]["data"]["payInitWrap"]["repeatCommitCheckCode"]
        else:
            raise Exception(rt["body"]["returnMsg"])

    @classmethod
    def buy(cls, data, JinE: int, LiuShui: str):
        data = {
            "delegationCode": data["delegationCode"],
            "buyNum": JinE,
            "repeatCommitCheckCode": LiuShui,
            "payType": "1",
            "password": cls.JYPW,
            "channelNo": "12",
            "kqCode": "",
            "kqType": "",
            "kqValue": ""
        }
        print(data)
        rt = cls.Web.PostJson(cls.BuyUrl, json.dumps(data))
        if rt["body"]["returnCode"] == "0000":
            return True
        else:
            raise Exception(rt["body"]["returnMsg"])
Пример #5
0
import pack.pyChrome as chrome

web = chrome.WebBrowser(False, False, 10)
id = ""


def login():
    global id
    rt = web.PostJson('http://183.247.236.130:8082/youngcenter_web_app/index',
                      {
                          'cardNo': '330105201603233458',
                          'password': '******'
                      })
    id = rt['msg']['successID']


def classList(campusid: int = 4, term: int = 0):
    classList = 'http://183.247.236.130:8082/youngcenter_web_app/appClass/classList?campusid=%d&specialtyid=&scheduleName' \
                '=&stdateTime=&enddateTime=&term=%d&sexType=1&minAge=2016/3/23&abilitys=&attitudes=&page=1&pageSize' \
                '=100 '
    rt = web.GetJson(classList % (campusid, term))
    data = [{
        'id': x['id'],
        'day': x['subject'][0:2],
        'time': x['subject'][3:5],
        'name': x['specialtyName']
    } for x in rt['msg']]
    return data


def getclass(class_id: str = '164897'):
Пример #6
0
        1600: 4,
        1700: 3,
        1800: 3,
        1900: 2,
        2000: 0
    }
    week2point = {'一': 0, '二': 0, '三': 0, '四': 0, '五': 0, '六': 1, '日': 2}
    time_point = 0
    week_point = 0
    if class_name in no_class_list:
        return 0
    for t in time2point_list:
        if class_time['start_time'] < t:
            time_point = time2point_list[t]
            break
    for w in week2point:
        if w == class_time['week']:
            week_point = week2point[w]
    return time_point * week_point


web = Chrome.WebBrowser(False)
n = 0
while True:
    get_class('4')
    time.sleep(60)
    n = n + 1
    if n % 10 == 0:
        Sms.SendSMS('15858291872', pack.tool.now_datetime())
    print(n)
Пример #7
0
 def __init__(self, default_phonenum: str = None):
     self.Web = pyChrome.WebBrowser(False)
     self.IsLogin = True
     self.error_time = 5
     if default_phonenum != None:
         self.default_phonenum = default_phonenum
Пример #8
0
 def __init__(self, default_phonenum: str = None):
     self.Web = pyChrome.WebBrowser(False)
     self.IsLogin = False
     if default_phonenum != None:
         self.default_phonenum = default_phonenum