From 3d2d3fdd2e1a34f0a0e75a63b4f2032249d8d6dd Mon Sep 17 00:00:00 2001 From: chenwj <654891551@qq.com> Date: Wed, 23 Nov 2022 16:20:49 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20py=E6=96=87=E4=BB=B6=E9=87=8D=E5=91=BD?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- chrome.py => youdian.py | 49 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) rename chrome.py => youdian.py (76%) diff --git a/chrome.py b/youdian.py similarity index 76% rename from chrome.py rename to youdian.py index d032abc..f0f9fa4 100644 --- a/chrome.py +++ b/youdian.py @@ -53,7 +53,7 @@ class Chrome(object): def pls(self, result=[]): # 点击排列三 - _pls = S('//*[@id="vue2_el"]/div/section/div[6]/div[4]/div[3]') + _pls = S('p.lottname.p3') wait_until(_pls.exists) click(_pls) zx = Text('组选') @@ -110,6 +110,53 @@ class Chrome(object): wait_until(back_2.exists) click(back_2) + def zuqiu(self): + # 点击竞彩足球 + _zq = S('p.lottname.zuqiu') + if not _zq.exists: + wait_until(_zq.exists) + click(_zq) + # 返回主页 + back_1 = S('a.backlink') + if not back_1.exists: + wait_until(back_1.exists) + click(back_1) + + def lanqiu(self): + # 点击竞彩篮球 + _lq = S('p.lottname.lanqiu') + if not _lq.exists: + wait_until(_lq.exists) + click(_lq) + # 返回主页 + back_1 = S('a.backlink') + if not back_1.exists: + wait_until(back_1.exists) + click(back_1) + + def ren9(self): + # 点击任选9 + _ren9 = S('p.lottname.ren9') + if not _ren9.exists: + wait_until(_ren9.exists) + click(_ren9) + # 返回主页 + back_1 = S('a.backlink') + if not back_1.exists: + wait_until(back_1.exists) + click(back_1) + + def zuqiu14(self): + # 点击十四场 + _zq14 = S('p.lottname.zuqiu14') + if not _zq14.exists: + wait_until(_zq14.exists) + click(_zq14) + # 返回主页 + back_1 = S('a.backlink') + if not back_1.exists: + wait_until(back_1.exists) + click(back_1) with Chrome(headless=False) as chrome: