12

Python 京东抢购茅台脚本(亲测可用)

 3 years ago
source link: https://blog.csdn.net/weixin_35770067/article/details/111825509
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Python 京东抢购茅台脚本(亲测可用)

安替-AnTi 2020-12-27 20:23:42 16048
分类专栏: Python
¥29.90

源代码可参考作者:https://github.com/huanghyw/jd_seckill

由于项目遵循GPL-3.0 License协议,明确项目内所有资源文件,禁止任何公众号、自媒体进行任何形式的转载、发布,故不写长篇篇幅来描述代码内容。

基于原作者的描述和本人的亲身实战,确实可以抢到茅台。

如有小白以及python入门者不懂详情,可以帮忙指导,抢购茅台。

#反复结算
def auto_check(self,times):
    while True:
        try:
            if driver.find_element_by_id('J_SelectAll1'):
                driver.find_element_by_id('J_SelectAll1').click()
                time.sleep(0.5)
                break
        except:
            time.sleep(0.5)
            pass

    while True:
        if datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S') >= times:
            while True:
                try:
                    driver.find_element_by_id("J_Go").click()
                    print("成功结算")
                    driver.find_element_by_link_text('提交订单').click()
                    print(f"抢购成功,请尽快付款")
                    time.sleep(5)
                    return 0
                except:
                    print("无法结算,重试")
                    time.sleep(1)
                    driver.get("https://cart.taobao.com/cart.htm")
                    self.auto_check(times)
def auto_check1(self,times):
    while True:
        if datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S.%f') >= times:
            while True:
                try:
                    driver.find_element_by_id("J_Go").click()
                    print("成功结算")
                    driver.find_element_by_link_text('提交订单').click()
                    print(f"抢购成功,请尽快付款")
                    time.sleep(5)
                    return 0
                except:
                    print("无法结算,重试")
                    time.sleep(1)
                    driver.get("https://cart.taobao.com/cart.htm")
                    self.auto_check(times)
# 运行
def run_driver(self, num, pwd, times):
    self.login_in(num, pwd, times)


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK