From 96346841e53c44efed471db13951478969c60944 Mon Sep 17 00:00:00 2001 From: chenwj113 Date: Mon, 24 Jul 2023 22:27:27 +0800 Subject: [PATCH] =?UTF-8?q?bugfix:=20=E4=BF=AE=E5=A4=8D=E6=89=8B=E6=9C=BA?= =?UTF-8?q?=E6=A8=A1=E6=8B=9F=E5=99=A8=E8=BF=87=E6=9C=9F=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- youdian.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/youdian.py b/youdian.py index 24ab814..ba98431 100644 --- a/youdian.py +++ b/youdian.py @@ -8,7 +8,7 @@ from selenium.webdriver import ChromeOptions class Chrome(object): def __init__(self, mobile=True, headless=True): - self.mobile_emulation = {'deviceName': 'iPad Mini'} + self.mobile_emulation = {'deviceName': 'iPhone 12 Pro'} self.mobile = mobile self.headless = headless @@ -24,7 +24,7 @@ class Chrome(object): chrome_options.add_argument('--headless') if self.mobile: chrome_options.add_experimental_option("mobileEmulation", self.mobile_emulation) - chrome_options.add_argument('user-agent="Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1"') + # chrome_options.add_argument('user-agent="Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1"') start_chrome("https://youdian.jindianle.com/", options=chrome_options) click(Text("您尚未登录,点击登录")) click(Text("密码登录")) @@ -264,8 +264,8 @@ with Chrome() as chrome: # chrome.balance() # 组选 # result = ['039', '048', '049', '138', '139', '147', '237', '238', '246', '247'] - result = ['237', '057', '129', '256', '247', '049', '067', '257', '059', '267', '069', '078', '258', '058', '357'] - chrome.pls(result = result, multiple=1, save_result=False) + result = ['258', '256', '156', '247', '067'] + chrome.pls(result = result, multiple=1, save_result=True) # 直选 # result = ['246', '264', '291', '219', '169'] # chrome.pls(result=result, is_group=False) \ No newline at end of file