我必须在 Android 上运行这个 Selenium Python 脚本。
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.options import Options
chrome_options = Options()
chrome_options.add_argument("--headless")
chrome_options.add_argument('--log-level=1')
s=Service("C:/Users/Python/chromedriver")
driver = webdriver.Chrome(service=s, options=chrome_options)
driver.get('https://www.amazon.it/dp/B08T769JQD')
title = driver.find_element(By.ID, "productTitle").text
print(title)
我试过 Pydroid,但是当我使用“pip install selenium”时,我有这个错误。
我安装了最后一个 pip 版本。
我尝试使用“curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh”安装 Rust,但出现此错误。
我看到存在Selendroid,但我如何用我的脚本和 Pydroid 来实现它?