淘宝每天自动领取金币/京东每天自动领取金豆/苏宁打卡获取云钻

看到某些人天天手动打卡,领取这些小奖励。虽然很少,不过,也是财富嘛。 白送白不要。 这些奖励在购物的时候可以抵消相应的金额。
 
所以写了个小程序来模拟人工,每天帮你自动打卡哈。(需要连接你的手机在电脑,然后执行程序。)
手机配置是1920x1080的屏幕分辨率,如果不是的话修改下代码(主要是触摸的坐标),就可以运行的啦。
 
#京东京豆
def jd():
d.screen.on()
d.press.home()
activity_name='com.jingdong.app.mall/.main.MainActivity'
launch_app(activity_name)

if not d(text=u'领京豆').wait.exists(timeout=20*1000):
print "Failed to get the page"
return
d(text=u'领京豆').click()
dou_x=853
dou_y=400

#glaxy_x=yun_x*gallery*full/cuizi_full
time.sleep(15)
d.click(dou_x,dou_y)
print "JD done"
 
#苏宁云钻
def suning():
#苏宁在6点之后
global displayWidth
global displayHeight
d.screen.on()
d.press.home()
'''
#解锁,没有密码的情况下
sx=560
sy=1700
ex=560
ey=900
#d.swipe(sx,sy,ex,ey,steps=2)

#d(scrollable=True).fling.horiz.forward()
#d(text=u'苏宁易购').swipe.right()
home_swipe_sx=950
home_swipe_sy=1350
home_swipe_ex=450
home_swipe_ey=1350
while not d(text=u"苏宁易购").exists:
d.swipe(home_swipe_sx,home_swipe_sy,home_swipe_ex,home_swipe_ey,steps=2)
time.sleep(3)
d(text=u'苏宁易购').click()
#time.sleep(10)
'''
activity_name='com.suning.mobile.ebuy/.base.host.InitialActivity'
launch_app(activity_name)
if not d(text=u'领云钻').wait.exists(timeout=20*1000):
print "Failed to get the page"
return
d(text=u'领云钻').click()
yun_x=372
yun_y=1524

#glaxy_x=yun_x*gallery*full/cuizi_full
time.sleep(15)
d.click(yun_x,yun_y)
time.sleep(10)

daka_x=displayWidth/2
daka_y=displayHeight/2
d.click(daka_x,daka_y)
time.sleep(20)
print "Sunning Done"

#淘宝的金币
def taobao_cuizi():
d.screen.on()
d.press.home()
#解锁,没有密码的情况下
'''
sx=560
sy=1700
ex=560
ey=900
#d.swipe(sx,sy,ex,ey,steps=2)

#d(scrollable=True).fling.horiz.forward()
home_swipe_sx=950
home_swipe_sy=1350
home_swipe_ex=450
home_swipe_ey=1350
while not d(text=u"手机淘宝").exists:
d.swipe(home_swipe_sx,home_swipe_sy,home_swipe_ex,home_swipe_ey,steps=2)
time.sleep(3)
d(text=u'手机淘宝').click()
'''
activity_name='com.taobao.taobao/com.taobao.tao.homepage.MainActivity3'
launch_app(activity_name)
if d(text=u'领金币').wait.exists(timeout=12*1000):
#print "Dismiss update"
d(text=u'领金币').click()
#登录账号,刷新下即可

time.sleep(15)
jb_x=900
jb_y=370
d.click(jb_x,jb_y)

完整代码:
https://github.com/Rockyzsu/red_bag
 

8 个评论

羡慕,我也开始学Python了。。170218
加油!呢。。。。。。
求问这个怎么用?
连着手机,然后会自动点击手机屏幕,领取一些奖励。
我下载了上传在github的文件夹,不知道怎么使用。对python完全外行...
这就需要学点入门的基础了。
好吧,可惜用不上了。thank you anyway!
请问这个怎么用呢

要回复文章请先登录注册