Beispiel #1
0
def get_before_136(uin):
    path = path1
    a = Excel(path).get_excel()
    print(a)
    flag = 1
    for i in a:
        flag += 1
        id = i.get('物品ID')
        if id is None:
            pass
        else:
            # 获取数据,如果有数据此时返回的是一个元组,没数据返回none
            # 第一个值为count,第二个值为ft,第三个值为vt
            count_t = do_reqd.getthingcount_andriod_136(uin, id)
            if count_t is None:
                Excel(path).write_excel(flag, 3, 0)
            else:
                if count_t[1] is None:
                    Excel(path).write_excel(flag, 3, count_t[0])
                else:
                    dat = do_chage.chagetime(count_t[1], count_t[2])
                    Excel(path).write_excel(flag, 3, dat)
Beispiel #2
0
def web_get_brfore_136(uin):
    path = path1
    a = Excel(path).get_excel()
    print(a)
    flag = 1
    for i in a:
        flag += 1
        id = i.get('物品ID')
        if id is None:
            pass
        else:
            # 获取数据
            if id == 40000001:
                count_t = WebReq().get_douzi(uin, 136)
            else:
                count_t = WebReq().get_things_count(uin, 136, id)
            if count_t is 0:
                Excel(path).write_excel(flag, 3, 0)
            else:
                if count_t[1] is None:
                    Excel(path).write_excel(flag, 3, count_t[0])
                else:
                    dat = do_chage.chagetime(count_t[1], count_t[2])
                    Excel(path).write_excel(flag, 3, dat)