资源简介
京东定时自动秒杀工具
python,扫描京东二维码登录,设置时间,定时自动抢购
代码片段和文件信息
# JDAutoBuy
import os
import sys
from selenium import webdriver
import datetime
import time
import json
from os import path
#将下面的路径替换为你电脑内chromedriver所在的路径
driver = webdriver.Chrome(“C:\\Program Files (x86)\\Google\\Chrome\\Application\\chromedriver“)
#headless_opt = webdriver.ChromeOptions()
#headless_opt.add_argument(‘--headless‘)
#time_driver = webdriver.Chrome(“C:\\Program Files (x86)\\Google\\Chrome\\Application\\chromedriver“ chrome_options=headless_opt)
#time_driver.get(“https://a.jd.com//ajax/queryServerData.html“)
#json_text = time_driver.find_element_by_css_selector(‘body‘).get_attribute(‘innerText‘)
#timest = json.loads(json_text)[‘serverTime‘]
#now = timest
def login():
driver.get(“https://www.jd.com/“)
if driver.find_element_by_class_na
评论
共有 条评论