【发布时间】:2022-01-19 10:42:03
【问题描述】:
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
options = webdriver.ChromeOptions()
options.add_experimental_option("excludeSwitches", ["enable-logging"])
driver = webdriver.Chrome(options=options, executable_path=r'C:/Users/u/Desktop/python/pythonfile/chromedriver.exe')
driver.get('https://www.plfil.com/actordetail/163964632064582')
#driver.find_element_by_css_selector('#root > div > div.actorProfileSectionDiv > div.floatDivBorder > div > div:nth-child(4) > div:nth-child(2) > a').click()
#driver.find_element_by_xpath('//*[@id="root"]/div/div[2]/div[3]/div/div[3]/div[1]/a/div/div').click()
#driver.find_element_by_css_selector('#root > div > div.actorProfileSectionDiv > div.floatDivBorder > div > div:nth-child(4) > div:nth-child(2) > a').click()
#driver.find_element_by_css_selector('#root > div > div.actorProfileSectionDiv > div.floatDivBorder > div > div:nth-child(4) > div:nth-child(2)').click()
#driver.find_element_by_class_name('div.PlfilButton'[0]).click()
我想点击 pdf 下载按钮,但我不能。我该怎么做?**
【问题讨论】:
-
访问所需元素需要哪些手动步骤?你看到什么错误?使用相关元素 HTML 和错误堆栈跟踪更新问题。
-
请澄清您的具体问题或提供其他详细信息以准确突出您的需求。正如目前所写的那样,很难准确地说出你在问什么。
标签: python selenium web-crawler