Compare commits

...

4 Commits

Author SHA1 Message Date
Garfield69
c920bea4ca Update .gitignore 2023-07-17 13:50:11 +12:00
ilike2burnthing
a785f83034 Update CHANGELOG.md 2023-07-16 23:46:31 +01:00
ilike2burnthing
b42c22f5b1 Bump version 3.2.2 2023-07-16 23:46:25 +01:00
Tyler Hagstrom
9c62410a8b Workaround for updated 'verify your are human' check (#816)
Co-authored-by: ilike2burnthing <59480337+ilike2burnthing@users.noreply.github.com>
2023-07-16 23:42:41 +01:00
4 changed files with 20 additions and 2 deletions

3
.gitignore vendored
View File

@@ -124,3 +124,6 @@ venv.bak/
.mypy_cache/
.dmypy.json
dmypy.json
# node
node_modules/

View File

@@ -1,5 +1,9 @@
# Changelog
## v3.2.2 (2023/07/16)
* Workaround for updated 'verify your are human' check
## v3.2.1 (2023/06/10)
* Kill dead Chrome processes in Windows

View File

@@ -1,6 +1,6 @@
{
"name": "flaresolverr",
"version": "3.2.1",
"version": "3.2.2",
"description": "Proxy server to bypass Cloudflare protection",
"author": "Diego Heras (ngosang / ngosang@hotmail.es)",
"license": "MIT"

View File

@@ -54,11 +54,15 @@ def get_webdriver(proxy: dict = None) -> WebDriver:
options.add_argument('--disable-software-rasterizer')
options.add_argument('--ignore-certificate-errors')
options.add_argument('--ignore-ssl-errors')
# fix GL erros in ASUSTOR NAS
# fix GL errors in ASUSTOR NAS
# https://github.com/FlareSolverr/FlareSolverr/issues/782
# https://github.com/microsoft/vscode/issues/127800#issuecomment-873342069
# https://peter.sh/experiments/chromium-command-line-switches/#use-gl
options.add_argument('--use-gl=swiftshader')
# workaround for updated 'verify your are human' check
# https://github.com/FlareSolverr/FlareSolverr/issues/811
options.add_argument('--auto-open-devtools-for-tabs')
options.add_argument('--headless=true')
if proxy and 'url' in proxy:
proxy_url = proxy['url']
@@ -98,6 +102,13 @@ def get_webdriver(proxy: dict = None) -> WebDriver:
if driver_exe_path is None:
PATCHED_DRIVER_PATH = os.path.join(driver.patcher.data_path, driver.patcher.exe_name)
shutil.copy(driver.patcher.executable_path, PATCHED_DRIVER_PATH)
# workaround for updated 'verify your are human' check
# https://github.com/FlareSolverr/FlareSolverr/issues/811
driver.execute_script('''window.open("","_blank");''')
driver.switch_to.window(window_name=driver.window_handles[0])
driver.close()
driver.switch_to.window(window_name=driver.window_handles[0])
# selenium vanilla
# options = webdriver.ChromeOptions()