本帖最后由 sun4ay 于 2023-8-29 11:37 编辑
[Python] 纯文本查看 复制代码 import time
from selenium.webdriver.common.by import By
import os
import logging
from datetime import datetime
from datetime import timedelta
from datetime import timezone
from selenium import webdriver
driver = webdriver.Firefox()
driver.get('https://www.baidu.com')
while True:
try:
if driver.find_element(By.LINK_TEXT, "工作台"):
driver.find_element(By.LINK_TEXT, "工作台").click()
# print(f"抢购成功,请尽快付款")
except:
print(f"主人,我已帮你抢到商品啦,您来支付吧")
break
driver.get('https://www.baidu.com')
now=time.sleep(130)
print(now)
button = driver.find_element_by_class_name(self, "btn")
button.click()
|