fix: auto.py增加手机模式
This commit is contained in:
parent
07e24ca5a7
commit
b9dfbbcbda
34
auto.py
34
auto.py
|
|
@ -1,7 +1,13 @@
|
||||||
from helium import *
|
|
||||||
import time
|
import time
|
||||||
|
|
||||||
driver = start_chrome("https://youdian.jindianle.com/", headless=True)
|
from helium import *
|
||||||
|
from selenium.webdriver import ChromeOptions
|
||||||
|
|
||||||
|
chrome_options = ChromeOptions()
|
||||||
|
mobile_emulation = {'deviceName': 'iPhone XR'}
|
||||||
|
chrome_options.add_experimental_option("mobileEmulation", mobile_emulation)
|
||||||
|
|
||||||
|
driver = start_chrome("https://youdian.jindianle.com/", headless=True, options=chrome_options)
|
||||||
click(Text("您尚未登录,点击登录"))
|
click(Text("您尚未登录,点击登录"))
|
||||||
click(Text("密码登录"))
|
click(Text("密码登录"))
|
||||||
write("15359827092", into="请输入手机号")
|
write("15359827092", into="请输入手机号")
|
||||||
|
|
@ -10,11 +16,23 @@ click(Button("登 录"))
|
||||||
# 进入页面先点击关闭弹窗按钮
|
# 进入页面先点击关闭弹窗按钮
|
||||||
_close = S('//*[@id="vue2_el"]/div/div[10]/div/p')
|
_close = S('//*[@id="vue2_el"]/div/div[10]/div/p')
|
||||||
click(_close)
|
click(_close)
|
||||||
# 点击竞彩足球
|
|
||||||
jczq = S('//*[@id="vue2_el"]/div/section/div[6]/div[2]/div[1]/a/p/em')
|
#
|
||||||
click(jczq)
|
pls = S('//*[@id="vue2_el"]/div/section/div[6]/div[4]/div[3]')
|
||||||
fenxi_list = find_all(Text("分析"))
|
group3 = S('#body > section > div.betmain.betmain_p3zx > div.betmain_p3zxmenu.topcenter > p:nth-child(1)')
|
||||||
print(fenxi_list)
|
click(pls)
|
||||||
# click(fenxi_list[0])
|
click(Text('组选'))
|
||||||
|
|
||||||
|
ball_0 = S('#body > section > div.betmain.betmain_p3zx > div.betmain_p3zxball > ul > li:nth-child(1) > p.ballline')
|
||||||
|
ball_1 = S('#body > section > div.betmain.betmain_p3zx > div.betmain_p3zxball > ul > li:nth-child(2) > p.ballline')
|
||||||
|
ball_2 = S('#body > section > div.betmain.betmain_p3zx > div.betmain_p3zxball > ul > li:nth-child(3) > p.ballline')
|
||||||
|
ball_3 = S('#body > section > div.betmain.betmain_p3zx > div.betmain_p3zxball > ul > li:nth-child(4) > p.ballline')
|
||||||
|
ball_4 = S('#body > section > div.betmain.betmain_p3zx > div.betmain_p3zxball > ul > li:nth-child(5) > p.ballline')
|
||||||
|
ball_5 = S('#body > section > div.betmain.betmain_p3zx > div.betmain_p3zxball > ul > li:nth-child(6) > p.ballline')
|
||||||
|
ball_6 = S('#body > section > div.betmain.betmain_p3zx > div.betmain_p3zxball > ul > li:nth-child(7) > p.ballline')
|
||||||
|
ball_7 = S('#body > section > div.betmain.betmain_p3zx > div.betmain_p3zxball > ul > li:nth-child(8) > p.ballline')
|
||||||
|
ball_8 = S('#body > section > div.betmain.betmain_p3zx > div.betmain_p3zxball > ul > li:nth-child(9) > p.ballline')
|
||||||
|
ball_9 = S('#body > section > div.betmain.betmain_p3zx > div.betmain_p3zxball > ul > li:nth-child(10) > p.ballline')
|
||||||
|
|
||||||
# time.sleep(5)
|
# time.sleep(5)
|
||||||
# kill_browser()
|
# kill_browser()
|
||||||
6
pls.py
6
pls.py
|
|
@ -20,8 +20,7 @@ for i in group3:
|
||||||
|
|
||||||
for i in sum_group_dict.keys():
|
for i in sum_group_dict.keys():
|
||||||
f3 = lambda number: True if '1' not in number else False
|
f3 = lambda number: True if '1' not in number else False
|
||||||
if i in [13, 16]:
|
print(i, -cachesum_group_dict[i])
|
||||||
print(i, list(filter(f3, sum_group_dict[i])))
|
|
||||||
# print(sum_group3_dict)
|
# print(sum_group3_dict)
|
||||||
# sum_group3 = [ sum(map(int, list(i))) for i in group3]
|
# sum_group3 = [ sum(map(int, list(i))) for i in group3]
|
||||||
# print(pd.value_counts(sum_group3).to_dict())
|
# print(pd.value_counts(sum_group3).to_dict())
|
||||||
|
|
@ -40,8 +39,7 @@ for i in sum_group6_dict.keys():
|
||||||
f4 = lambda number: True if max(map(int, number)) - min(map(int, number)) != 2 else False
|
f4 = lambda number: True if max(map(int, number)) - min(map(int, number)) != 2 else False
|
||||||
f5 = lambda number: True if '3' not in number else False
|
f5 = lambda number: True if '3' not in number else False
|
||||||
f3 = lambda number: True if '8' not in number else False
|
f3 = lambda number: True if '8' not in number else False
|
||||||
if i in [13, 16]:
|
print(i, sum_group6_dict[i])
|
||||||
print(i, list(filter(f3, sum_group6_dict[i])))
|
|
||||||
# print(pd.value_counts(sum_group3).to_dict())
|
# print(pd.value_counts(sum_group3).to_dict())
|
||||||
|
|
||||||
# 连号
|
# 连号
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue