mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2026-01-07 04:14: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()
|
# chromedriver_autoinstaller.install()
|
||||||
os.chmod("/MissKaty/chromedriver", 755)
|
os.chmod("/MissKaty/chromedriver", 755)
|
||||||
chrome_options = webdriver.ChromeOptions()
|
chrome_options = webdriver.ChromeOptions()
|
||||||
chrome_options.binary_location = "/usr/bin/google-chrome"
|
|
||||||
chrome_options.add_argument("--headless")
|
chrome_options.add_argument("--headless")
|
||||||
chrome_options.add_argument("--no-sandbox")
|
chrome_options.add_argument("--no-sandbox")
|
||||||
chrome_options.add_argument("--disable-dev-shm-usage")
|
chrome_options.add_argument("--disable-dev-shm-usage")
|
||||||
wd = webdriver.Chrome("/MissKaty/chromedriver", chrome_options=chrome_options)
|
driver = webdriver.Chrome(
|
||||||
wd.get("https://pahe.li/")
|
options=chrome_options, executable_path="/MissKaty/chromedriver"
|
||||||
LOGGER.info(wd.page_source)
|
)
|
||||||
|
driver.get("https://pahe.li/")
|
||||||
|
LOGGER.info(driver.page_source)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue