您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息
免费发信息
三六零分类信息网 > 太原分类信息网,免费分类信息发布

Python那些事——一个好玩的彩票自动投注方法

2023/8/2 20:21:09发布41次查看
平常比较对数字敏感,闲暇之余,结合网上资料,在这里为大家做一个简单的彩票模拟自动投注脚步,界面简陋,希望大家多多包涵!
最近有人问我,能不能分享一个关于视频爬虫的编程思路,于是我在网上查找之后准备发送,奈何头条连续两次不通过,怎么说,我也很无奈···有机会我会开一个微信公公众号,头条不能推送的文章我会分享到公众号里,希望大家多多支持哦!
纯属业余爱好,彩票嘛,一时兴起,结合着多年买彩票不中的经验······你们懂的
目前感觉还不错,也不知道用了能不能中···话不多说,干货来袭!(因为时间紧急,来不及美化,直接上代码!)
在这里可以设置 盈利预期 随机投注倍数
#coding:utf-8
import time
from selenium import webdriver
from selenium.webdrivermon.keys import keys
import os,random,re
import urllib
import get_cphao
def get3qihao_old(now_qishu): #取近3期的旧版本
#返回近3期组六
list3=[]
x=get_cphao.getbyqi(str(int(now_qishu)-1))
y=get_cphao.getbyqi(str(int(now_qishu)-2))
z=get_cphao.getbyqi(str(int(now_qishu)-3))
print x,y,z
for z6 in [x,y,z]:
if z6!=none:
list3.append(.join(sorted(z6)))
else:
continue
return list3
def get3qihao(now_qishu):
url='http://fx.cp2y/xcqssc/draw_10089_history/?lid=10089&today=0'
page = urllib.urlopen(url)
sc=page.read()
for a in range(int(now_qishu),int(now_qishu)-3,-1):
print str(a)+'期'
a=str(int(a)-1)
reg = str(a)+r'.*\n.* *'
imgre1 = repile(reg)
b= re.findall(imgre1,sc)
# print b,b
if len(b)!=0:
c= .join(b).split('') #['170624040 12:41 \r\n\t\t\t\t5', '3', '9', '2', '7 ']
# print c,c
if len(c)!=0:
print c[2]+c[3]+c[4][0]
hao=str(c[2]+c[3]+c[4][0])
list3.append(.join(sorted(hao)))
print list3
def proceed(dic):
sy=0
cb=0
# dic={u'170624072': 0.64, u'170624080': 0.64, u'170624083': 0.64, u'170624082': 0.64, u'170624085': 0.64, u'170624084': 0.64, u'170624086': 0.64}
for k,v in dic.items():
# print get_cphao.getbyqi(k)
temp=get_cphao.getbyqi(k)
if temp!=none:
# temp=get_cphao.getbyqi(k)
a= .join(sorted(temp))
if a in haoma:
sy+=dic[k]*2.5
cb+=dic[k]
print 有none
return (sy-cb)
znum=0
current_qihao=0
list_z3=[] #最近3期情况
touru=0
shouyi=0
beishu=0
cp_data={} #期号投入情况,便于计算收益
def firstcp():
file1=open(r'd:/downloads/cp_log.txt','a+')
time.sleep(5)
try:
now_qishu=b.find_element_by_xpath('//*[@id=current_issue]').text
except:
time.sleep(10)
print u停顿10秒后找当期号!
b.find_element_by_xpath('//*[@id=tabbar-p-s2]/span[3]/span[2]').click()
print find it
print u当前期数:%s%now_qishu
# get3qihao(now_qishu) 这里会输出一次
global znum
global current_qihao #用作外部判断用
global list_z3
global touru
global shouyi
current_qihao=now_qishu
zhongjiangcishu=0
global beishu
for hm in get3qihao(now_qishu):
if hm in haoma:
zhongjiangcishu+=1 #最近3期的中奖次数
znum+=1
print u全计划已中:%s次%znum
print 最近3期中 %s次%zhongjiangcishu
list_z3.append(zhongjiangcishu)
beishu='5'
if len(list_z3)>=5 and (list_z3[-5:].count(0)==5): #列表里至少有4个记录,并且最近3记录都是0情况
beishu=random.randint(8,15)
print beishu
b.find_element_by_xpath('//*[@id=tabbar-p-s2]/span[3]/span[2]').click() #后三
time.sleep(2)
b.find_element_by_xpath('//*[@id=smalllabel_1_3]').click()
print test
if zhongjiangcishu=5): #对近3期中1加入50%随机
b.find_element_by_xpath('//*[@id=lt_sel_times]').send_keys('4') #倍模式
file1.write(5:倍数 近3期==1 +'\n')
print 本轮放弃,不投注,current_qihao
b=webdriver.chrome()
b.set_window_position(-500,0)
b.implicitly_wait(30)
b.get('http://game.03sjc/')
b.maximize_window()
b.find_element_by_xpath('//*[@id=username]').send_keys('username')
time.sleep(30)
print ha ha ha where's the money ?
print ****************************************
print begin the game! show me the money !
print b.title
num=0
haoma='013,014,016,017,019,023,025,026,028,' \
'029,034,035,036,037,038,039,046,047,049,' \
'056,058,059,067,068,069,079,089,134,136,137,139,' \
'146,149,167,169,179,235,236,238,239,256,259,268,' \
'269,289,346,347,349,356,358,359,367,368,369,379,' \
b.switch_to_frame('leftframe')
print b.find_element_by_xpath('//*[@id=usermoney]').text
b.find_element_by_xpath('//*[@id=leftcon]/p[3]/p/a[1]').click() #重庆
time.sleep(4)
b.switch_to.default_content() #google
# b._switch_to.parent_frame() #ie
time.sleep(0.5)
b.switch_to_frame('mainframe')
print ready go!!!
b.find_element_by_xpath('//*[@id=lt_sel_dyprize]/option[2]').click()
for i in range(100):
print 这是第 %s 次 运行:%num
last_id=current_qihao
print lastid :,last_id
# firstcp()
print u前倍数:,beishu
firstcp()
except exception as msg:
print msg
print u后倍数:,beishu
print cp_data
count=0
ctime=100
ncount=ctime-count
print current:,current_qihao
# print int(current_qihao)-int(last_id)
while(int(current_qihao)=10.0:
print 收益达到预期,结束
b.quit()
结束!
时间比较赶,代码这块就连续了,你们可以自己复制下来执行一下,挺好玩的。
还是那句话,你们的支持是我更新的最大动力,喜欢就加关注哦!
太原分类信息网,免费分类信息发布

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录