From 8d75796a7ec0cdce891c9519f7511900d1baa2bf Mon Sep 17 00:00:00 2001 From: RogerWork Date: Fri, 14 Feb 2025 17:37:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jd_playwright.py | 4 ++-- jd_uia.py | 27 ++++++++++++++++----------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/jd_playwright.py b/jd_playwright.py index f69a804..32b35c4 100644 --- a/jd_playwright.py +++ b/jd_playwright.py @@ -15,9 +15,9 @@ def get_firday(): target: str = get_firday() # 19920002680 -# user = {'mobile': '19920002680', 'password': 'Sxzgx1209'} +user = {'mobile': '19920002680', 'password': 'Sxzgx1209'} # 18611659484 -user = {'mobile': '18611659484', 'password': 'Rog129Sunx1532'} +# user = {'mobile': '18611659484', 'password': 'Rog129Sunx1532'} target_timestamp = int(time.mktime(time.strptime(target, '%Y-%m-%d %H:%M:%S'))*1000) AC_URL = f"https://h5static.m.jd.com/mall/active/xXzWGzxuJ6HRksjXms2x3cQsh25/index.html?utm_term=Wxfriends&utm_user=plusmember&utm_source=iosapp&utm_campaign=t_335139774&utm_medium=appshare&_ts={str(target_timestamp)}&ad_od=share&gxd=RnAowmYKPGXfnp4Sq4B_W578vOMp4E7JgUugKDcomXTOIlSPI-BCnvuytD0G7kc&gx=RnAomDgLPTTeyp5Z_sA9" diff --git a/jd_uia.py b/jd_uia.py index 5c0faf8..7e1fca4 100644 --- a/jd_uia.py +++ b/jd_uia.py @@ -39,17 +39,22 @@ class JdClient: # print('等待1秒') self.dev.implicitly_wait(2) - self.dev.click(531, 1323) - while True: #531,1323 - if self.dev(text='成功邀请10人助力赢好礼').exists: - print(self.device, '成功邀请10人助力赢好礼') - self.dev.implicitly_wait(1) - # self.dev(text='为好友助力').click() - self.dev.click(531, 1323) - break - else: - self.dev.implicitly_wait(1) - # print('等待1秒') + # self.dev.click(531, 1323) + # while True: #531,1323 + # if self.dev(text='成功邀请10人助力赢好礼').exists: + # print(self.device, '成功邀请10人助力赢好礼') + # self.dev.implicitly_wait(1) + # # self.dev(text='为好友助力').click() + # self.dev.click(531, 1323) + # break + # else: + # self.dev.implicitly_wait(1) + # # print('等待1秒') + n = 10 + while n > 0: + self.dev.click(531, 1323) + self.dev.implicitly_wait(1) + n -= 1 def full_steps(self, text): self.set_clipboard(text)