mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2026-01-03 11:04:51 +00:00
Nyoba selenium
This commit is contained in:
parent
19c9834dff
commit
042de39c48
1 changed files with 5 additions and 4 deletions
|
|
@ -16,10 +16,11 @@ async def pahe(_, msg):
|
|||
# chromedriver_autoinstaller.install()
|
||||
os.chmod("/MissKaty/chromedriver", 755)
|
||||
chrome_options = webdriver.ChromeOptions()
|
||||
chrome_options.binary_location = "/usr/bin/google-chrome"
|
||||
chrome_options.add_argument("--headless")
|
||||
chrome_options.add_argument("--no-sandbox")
|
||||
chrome_options.add_argument("--disable-dev-shm-usage")
|
||||
wd = webdriver.Chrome("/MissKaty/chromedriver", chrome_options=chrome_options)
|
||||
wd.get("https://pahe.li/")
|
||||
LOGGER.info(wd.page_source)
|
||||
driver = webdriver.Chrome(
|
||||
options=chrome_options, executable_path="/MissKaty/chromedriver"
|
||||
)
|
||||
driver.get("https://pahe.li/")
|
||||
LOGGER.info(driver.page_source)
|
||||
|
|
|
|||
Loading…
Reference in a new issue