Add chromedrivermanager
This commit is contained in:
parent
499f0e9cbb
commit
e9b2928299
3 changed files with 5 additions and 7 deletions
8
main.py
8
main.py
|
@ -18,6 +18,7 @@ from traceback import print_exc
|
||||||
from requests_html import HTMLSession
|
from requests_html import HTMLSession
|
||||||
from argparse import ArgumentParser
|
from argparse import ArgumentParser
|
||||||
import os
|
import os
|
||||||
|
from webdriver_manager.chrome import ChromeDriverManager
|
||||||
|
|
||||||
debugmode = False
|
debugmode = False
|
||||||
|
|
||||||
|
@ -62,12 +63,7 @@ instance_root_url = "http://127.0.0.1:8002"
|
||||||
chrome_options = Options()
|
chrome_options = Options()
|
||||||
chrome_options.add_argument("--headless")
|
chrome_options.add_argument("--headless")
|
||||||
|
|
||||||
if os.name == 'nt':
|
driver = webdriver.Chrome(ChromeDriverManager().install(), options=chrome_options)
|
||||||
# Windows
|
|
||||||
driver = webdriver.Chrome('./chromedriver.exe', options=chrome_options)
|
|
||||||
else:
|
|
||||||
# Linux
|
|
||||||
driver = webdriver.Chrome('./chromedriver', options=chrome_options)
|
|
||||||
|
|
||||||
channels = []
|
channels = []
|
||||||
|
|
||||||
|
|
|
@ -3,3 +3,4 @@ requests
|
||||||
flask
|
flask
|
||||||
selenium
|
selenium
|
||||||
requests_html
|
requests_html
|
||||||
|
webdriver-manager
|
1
static/img/magnifying-glass-solid.svg
Normal file
1
static/img/magnifying-glass-solid.svg
Normal file
|
@ -0,0 +1 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"/></svg>
|
After Width: | Height: | Size: 480 B |
Loading…
Reference in a new issue