mirror of
https://github.com/FlareSolverr/FlareSolverr.git
synced 2025-12-06 17:48:40 +01:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b42c22f5b1 | ||
|
|
9c62410a8b |
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "flaresolverr",
|
"name": "flaresolverr",
|
||||||
"version": "3.2.1",
|
"version": "3.2.2",
|
||||||
"description": "Proxy server to bypass Cloudflare protection",
|
"description": "Proxy server to bypass Cloudflare protection",
|
||||||
"author": "Diego Heras (ngosang / ngosang@hotmail.es)",
|
"author": "Diego Heras (ngosang / ngosang@hotmail.es)",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
|
|||||||
13
src/utils.py
13
src/utils.py
@@ -54,11 +54,15 @@ def get_webdriver(proxy: dict = None) -> WebDriver:
|
|||||||
options.add_argument('--disable-software-rasterizer')
|
options.add_argument('--disable-software-rasterizer')
|
||||||
options.add_argument('--ignore-certificate-errors')
|
options.add_argument('--ignore-certificate-errors')
|
||||||
options.add_argument('--ignore-ssl-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/FlareSolverr/FlareSolverr/issues/782
|
||||||
# https://github.com/microsoft/vscode/issues/127800#issuecomment-873342069
|
# https://github.com/microsoft/vscode/issues/127800#issuecomment-873342069
|
||||||
# https://peter.sh/experiments/chromium-command-line-switches/#use-gl
|
# https://peter.sh/experiments/chromium-command-line-switches/#use-gl
|
||||||
options.add_argument('--use-gl=swiftshader')
|
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:
|
if proxy and 'url' in proxy:
|
||||||
proxy_url = proxy['url']
|
proxy_url = proxy['url']
|
||||||
@@ -99,6 +103,13 @@ def get_webdriver(proxy: dict = None) -> WebDriver:
|
|||||||
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)
|
||||||
|
|
||||||
|
# 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
|
# selenium vanilla
|
||||||
# options = webdriver.ChromeOptions()
|
# options = webdriver.ChromeOptions()
|
||||||
# options.add_argument('--no-sandbox')
|
# options.add_argument('--no-sandbox')
|
||||||
|
|||||||
Reference in New Issue
Block a user