nkvoronov / script.module.selenium

6 stars 2 forks source link

Where is the PATH that is asking me? #2

Open ponchofcult opened 2 years ago

ponchofcult commented 2 years ago

Hello there, nkvoronov! Im trying to scrape with selenium a website but before i want to understant how it works with an easy code can you tell me please if im wrong with something?

`from selenium import webdriver

from selenium.webdriver.common.utils import get_driver_path # Dont found utils

from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC

URL = 'https://aidoru-online.me/' LOGIN_ROUTE = 'login.php'

url = 'https://www.google.com/'

options = webdriver.ChromeOptions() options.add_argument('headless') driver = webdriver.Chrome("./chromedriver.exe", chrome_options=options) driver.get(url)

@Route.register def root(plugin, content_type="segment"): item =Listitem() item.label = driver.getTitle() yield item`

Thanks in advance

nkvoronov commented 2 years ago

https://github.com/nkvoronov/script.module.selenium [README.md] + https://github.com/nkvoronov/script.module.webdriver (BIN) + https://github.com/nkvoronov/script.module.webvideonodes (examples)