Skip to content
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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ requires-python = ">=3.14"
dependencies = [
"openai>=2.32.0",
"rich>=15.0.0",
"selenium>=4.43.0",
"seleniumbase>=4.30.0",
"tqdm>=4.67.3",
]

Expand Down
14 changes: 7 additions & 7 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
from seleniumbase import Driver
from tqdm import tqdm

from configs import KEYWORDS, LANGUAGES, PATHS, REGEX_LIST
Expand Down Expand Up @@ -57,19 +58,18 @@ def login_to_github(self):
"""
Login to GitHub
"""
rich.print("🌍 Opening Chrome ...")
rich.print("🌍 Opening Chrome (SeleniumBase UC mode) ...")

options = webdriver.ChromeOptions()
options.add_argument("--ignore-certificate-errors")
options.add_argument("--ignore-ssl-errors")

self.driver = webdriver.Chrome(options=options)
self.driver = Driver(
uc=True,
chromium_arg="--ignore-certificate-errors,--ignore-ssl-errors",
)
self.driver.implicitly_wait(3)

self.cookies = CookieManager(self.driver)

cookie_exists = os.path.exists("cookies.pkl")
self.driver.get("https://github.com/login")
self.driver.uc_open_with_reconnect("https://github.com/login", reconnect_time=3)

if not cookie_exists:
rich.print("🤗 No cookies found, please login to GitHub first")
Expand Down
Loading