From 200a91c9f7b6b863a820c65be615bbec0885f005 Mon Sep 17 00:00:00 2001 From: chenwj113 Date: Mon, 5 Dec 2022 14:14:58 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E5=87=BA=E9=94=99=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- auto_v2.py | 14 +++++++++++--- get_data.py | 4 +++- pls.py | 8 ++++---- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/auto_v2.py b/auto_v2.py index 9e150a1..4016b41 100644 --- a/auto_v2.py +++ b/auto_v2.py @@ -20,8 +20,12 @@ try: write("c113w927j", into="请输入6-12位数字或字母") click(Button("登 录")) # 进入页面先点击关闭弹窗按钮 + _topclose = S('div.layerimg_topclose') + if _topclose.exists: + click(_topclose) _close = S('//*[@id="vue2_el"]/div/div[10]/div/p') - click(_close) + if _close.exists: + click(_close) #店内账本 # click(Text("店内账本")) @@ -48,9 +52,9 @@ try: pls = S('p.lottname.p3') wait_until(pls.exists) click(pls) - wait_until(Text('组选').exists) + # wait_until(Text('组选').exists) click(Text('组选')) - result = ['258', '357', '069', '168', '078', '267', '159', '339', '177', '366'] + result = ['039', '147', '057', '156', '138', '368', '269', '089', '458', '467'] for index, item in enumerate(result): if len(set(item)) == 3: # 普通投注-> 取消组3 @@ -82,6 +86,10 @@ try: if index + 1 != len(result): wait_until(Text("+继续添加").exists) click(Text("+继续添加")) + # # 设置倍数后,再点击一次下一步 + # plus = Text("+") + # for i in range(2): + # click(plus) save = Text("保存") wait_until(save.exists) click(Text("保存")) diff --git a/get_data.py b/get_data.py index 57cb4b1..1834eb5 100644 --- a/get_data.py +++ b/get_data.py @@ -47,4 +47,6 @@ if __name__ == '__main__': # url = "https://kaijiang.500.com/shtml/sd/04001.shtml" # url = "https://kaijiang.500.com/shtml/plw/04001.shtml" # main(url, lottery_type='plw') - get_data(url, lottery_type= 'pls') \ No newline at end of file + for i in range(22320, 22321): + url = f"https://kaijiang.500.com/shtml/pls/{i}.shtml" + get_data(url, lottery_type= 'pls') \ No newline at end of file diff --git a/pls.py b/pls.py index 0a3fc28..1e61a8e 100644 --- a/pls.py +++ b/pls.py @@ -36,10 +36,10 @@ for i in sum_group6_dict.keys(): f2 = lambda number: len([i for i in number if int(i) %2 == 1]) != 0 f3 = lambda number: True if max(map(int, number)) - min(map(int, number)) != 2 else False f4 = lambda number: True if '3' not in number else False - f5 = lambda number: True if '2' not in number else False - if i in [15, 21]: - result = sum_group6_dict[i]+sum_group3_dict[i] - print(i, list(filter(f5, result))) + f5 = lambda number: True if 'a' not in number else False + if i in [12, 17]: + result = sum_group6_dict[i] + sum_group3_dict[i] + print(i, list(filter(f1, result))) # print(i, sum_group3_dict[i]) # 连号