feat: updated flaresolverr

This commit is contained in:
Julien Malka 2023-04-08 21:34:31 +02:00
parent 0cc750ef37
commit 1117ecff61
Signed by: Luj
GPG key ID: 6FC74C847011FD83
2 changed files with 9 additions and 7 deletions

View file

@ -9,14 +9,14 @@ stdenv.mkDerivation
rec { rec {
pname = "flaresolverr"; pname = "flaresolverr";
version = "3.0.2"; version = "3.1.2";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = pname; owner = pname;
repo = pname; repo = pname;
rev = "v${version}"; rev = "v${version}";
sha256 = "sha256-zpeJf1CaQ4bsncZz44sH+tFKddYrZf7YdNYL50d9GA4="; sha256 = "sha256-36ILIyMTzm9pK9aakfZHfsHWy9xHtFez8QGZuIJ04vM=";
}; };
buildInputs = [ pkgs.makeWrapper ]; buildInputs = [ pkgs.makeWrapper ];

View file

@ -1,19 +1,21 @@
diff --git a/src/utils.py b/src/utils.py diff --git a/src/utils.py b/src/utils.py
index ceff7ec..06623bb 100644 index eee8868..4b0d226 100644
--- a/src/utils.py --- a/src/utils.py
+++ b/src/utils.py +++ b/src/utils.py
@@ -69,13 +69,10 @@ def get_webdriver() -> WebDriver: @@ -80,14 +80,10 @@ def get_webdriver() -> WebDriver:
# downloads and patches the chromedriver # downloads and patches the chromedriver
# if we don't set driver_executable_path it downloads, patches, and deletes the driver each time # if we don't set driver_executable_path it downloads, patches, and deletes the driver each time
- driver = uc.Chrome(options=options, driver_executable_path=driver_exe_path, version_main=version_main, - driver = uc.Chrome(options=options, browser_executable_path=browser_executable_path,
+ driver = uc.Chrome(options=options, driver_executable_path="CHANGEME", - driver_executable_path=driver_exe_path, version_main=version_main,
windows_headless=windows_headless) - windows_headless=windows_headless)
+ driver = uc.Chrome(options=options, driver_executable_path="CHANGEME", windows_headless=windows_headless)
# save the patched driver to avoid re-downloads # save the patched driver to avoid re-downloads
- if driver_exe_path is None: - if driver_exe_path is None:
- PATCHED_DRIVER_PATH = os.path.join(driver.patcher.data_path, driver.patcher.exe_name) - PATCHED_DRIVER_PATH = os.path.join(driver.patcher.data_path, driver.patcher.exe_name)
- shutil.copy(driver.patcher.executable_path, PATCHED_DRIVER_PATH) - shutil.copy(driver.patcher.executable_path, PATCHED_DRIVER_PATH)
+
# selenium vanilla # selenium vanilla
# options = webdriver.ChromeOptions() # options = webdriver.ChromeOptions()