fix: 修复自动提交出错的问题

This commit is contained in:
chenwj113 2022-12-05 14:14:58 +08:00
parent d28f27603c
commit 200a91c9f7
3 changed files with 18 additions and 8 deletions

View File

@ -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("保存"))

View File

@ -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')
for i in range(22320, 22321):
url = f"https://kaijiang.500.com/shtml/pls/{i}.shtml"
get_data(url, lottery_type= 'pls')

8
pls.py
View File

@ -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])
# 连号