這是 html 文件:問題是 href 上的日期每周都在變化。
1 回答

慕碼人8056858
TA貢獻1803條經驗 獲得超6個贊
引起一些等待并使用 css 選擇器。
WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.CSS_SELECTOR, "a.link-lg.pull-right.flip.ng-scope"))).click()
進口
from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC
添加回答
舉報
0/150
提交
取消