0

我必须在 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 来实现它?

4

1 回答 1

0

/storage/emulated/0 pip install --no-deps selenium

这将忽略其他安装

在 Pydroid 中工作

于 2022-02-25T19:37:38.577 回答