python,通过基于web的应用程序在浏览器中多步运行selenium
我目前只能访问不允许下载的学校计算机。我正在尝试通过基于web的python应用程序使用可变线程运行selenium。例如,我尝试了repl.it和在线Juypterlab,但遇到了问题。例如,我的代码看起来像是真的。它python,通过基于web的应用程序在浏览器中多步运行selenium,python,selenium,Python,Selenium,我目前只能访问不允许下载的学校计算机。我正在尝试通过基于web的python应用程序使用可变线程运行selenium。例如,我尝试了repl.it和在线Juypterlab,但遇到了问题。例如,我的代码看起来像是真的。它 from selenium import webdriver from selenium.webdriver.chrome.options import Options import _thread chrome_options = Options() chrome_opti
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
import _thread
chrome_options = Options()
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--disable-dev-shm-usage')
def thread1():
driver = webdriver.Chrome(options=chrome_options)
driver.get("https://www.youtube.com")
def thread2():
driver = webdriver.Chrome(options=chrome_options)
driver.get("https://www.google.com")
_thread.start_new_thread(thread1, ())
_thread.start_new_thread(thread2, ())
我尝试的juypterlab代码看起来像
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
import _thread
def thread1():
driver = webdriver.Chrome('/Applications/chromedriver')
driver.get("https://www.youtube.com")
def thread2():
driver = webdriver.Chrome('/Applications/chromedriver')
driver.get("https://www.google.com")
_thread.start_new_thread(thread1, ())
_thread.start_new_thread(thread2, ())
我与repl.it的问题是,我无法获得可变线程和在线juypterlab,我无法获得我的chromedriver工作的路径。在基于web的环境中,如何让可变的selenium踏板同时工作?我认为主要问题是无法在基于web的应用程序上获取路径