Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added chromedriver support for chromium 116 #89

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
colorama
requests
undetected-chromedriver==3.4.6
undetected-chromedriver==3.5.2
selenium==4.9.0
certifi==2023.5.7
webdriver-manager==4.0.0
4 changes: 4 additions & 0 deletions src/app.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import atexit
import logging
import traceback
import os
from random import randint
from time import sleep, time

from selenium.common.exceptions import WebDriverException
import selenium.webdriver.support.expected_conditions as EC # noqa
from selenium.webdriver.common.by import By
from selenium.webdriver.support.wait import WebDriverWait
from webdriver_manager.chrome import ChromeDriverManager
import undetected_chromedriver as uc

from constants import YOUTUBE_LOGIN_URL, YOUTUBE_AUTH_PASS, YOUTUBE_AUTH_FAIL, YOUTUBE_AUTH_ANY_RE, \
Expand Down Expand Up @@ -46,12 +48,14 @@ def get_chrome_options(config: dict) -> uc.ChromeOptions:
def get_driver(profile: str, config: dict) -> uc.Chrome:
global CURRENT_VERSION_MAIN

os.environ['WDM_LOG'] = str(logging.NOTSET)
kwargs = {
'options': get_chrome_options(config),
'user_data_dir': PATH_PROFILES.joinpath(profile).absolute(),
'headless': config['headless'],
'log_level': 1 if is_debug() else 0,
'version_main': CURRENT_VERSION_MAIN,
'driver_executable_path': ChromeDriverManager().install(),
}

try:
Expand Down