mirror of
https://github.com/FlareSolverr/FlareSolverr.git
synced 2025-12-05 17:18:19 +01:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ab0fe58d4a | ||
|
|
f68ddb7573 | ||
|
|
ac77110578 | ||
|
|
a9d1a2de2d | ||
|
|
ab5f14d6c3 | ||
|
|
e0bf02fb8b | ||
|
|
82a1cd835a | ||
|
|
7017715e21 | ||
|
|
ae18559db1 |
2
.github/workflows/autotag.yml
vendored
2
.github/workflows/autotag.yml
vendored
@@ -6,7 +6,7 @@ on:
|
|||||||
- "master"
|
- "master"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
tag-release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
|
|||||||
2
.github/workflows/release-docker.yml
vendored
2
.github/workflows/release-docker.yml
vendored
@@ -6,7 +6,7 @@ on:
|
|||||||
- 'v*.*.*'
|
- 'v*.*.*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build-docker-images:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
|
|||||||
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@@ -36,7 +36,7 @@ jobs:
|
|||||||
draft: false
|
draft: false
|
||||||
prerelease: false
|
prerelease: false
|
||||||
|
|
||||||
build-linux:
|
build-linux-package:
|
||||||
name: Build Linux binary
|
name: Build Linux binary
|
||||||
needs: create-release
|
needs: create-release
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
@@ -65,7 +65,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
asset_paths: '["./dist/flaresolverr_*"]'
|
asset_paths: '["./dist/flaresolverr_*"]'
|
||||||
|
|
||||||
build-windows:
|
build-windows-package:
|
||||||
name: Build Windows binary
|
name: Build Windows binary
|
||||||
needs: create-release
|
needs: create-release
|
||||||
runs-on: windows-2022
|
runs-on: windows-2022
|
||||||
|
|||||||
13
CHANGELOG.md
13
CHANGELOG.md
@@ -1,5 +1,18 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## v3.1.2 (2023/04/02)
|
||||||
|
|
||||||
|
* Fix headless mode in macOS
|
||||||
|
* Remove redundant artifact from Windows binary package
|
||||||
|
* Bump Selenium dependency
|
||||||
|
|
||||||
|
## v3.1.1 (2023/03/25)
|
||||||
|
|
||||||
|
* Distribute binary executables in compressed package
|
||||||
|
* Add icon for binary executable
|
||||||
|
* Include information about supported architectures in the readme
|
||||||
|
* Check Python version on start
|
||||||
|
|
||||||
## v3.1.0 (2023/03/20)
|
## v3.1.0 (2023/03/20)
|
||||||
|
|
||||||
* Build binaries for Linux x64 and Windows x64
|
* Build binaries for Linux x64 and Windows x64
|
||||||
|
|||||||
14
README.md
14
README.md
@@ -64,12 +64,18 @@ Remember to restart the Docker daemon and the container after the update.
|
|||||||
|
|
||||||
### Precompiled binaries
|
### Precompiled binaries
|
||||||
|
|
||||||
|
> **Warning**
|
||||||
|
> Precompiled binaries are only available for x64 architecture. For other architectures see Docker images.
|
||||||
|
|
||||||
This is the recommended way for Windows users.
|
This is the recommended way for Windows users.
|
||||||
* Download the [FlareSolverr executable](https://github.com/FlareSolverr/FlareSolverr/releases) from the release's page. It is available for Windows x64 and Linux x64.
|
* Download the [FlareSolverr executable](https://github.com/FlareSolverr/FlareSolverr/releases) from the release's page. It is available for Windows x64 and Linux x64.
|
||||||
* Execute FlareSolverr binary. In the environment variables section you can find how to change the configuration.
|
* Execute FlareSolverr binary. In the environment variables section you can find how to change the configuration.
|
||||||
|
|
||||||
### From source code
|
### From source code
|
||||||
|
|
||||||
|
> **Warning**
|
||||||
|
> Installing from source code only works for x64 architecture. For other architectures see Docker images.
|
||||||
|
|
||||||
* Install [Python 3.11](https://www.python.org/downloads/).
|
* Install [Python 3.11](https://www.python.org/downloads/).
|
||||||
* Install [Chrome](https://www.google.com/intl/en_us/chrome/) (all OS) or [Chromium](https://www.chromium.org/getting-involved/download-chromium/) (just Linux, it doesn't work in Windows) web browser.
|
* Install [Chrome](https://www.google.com/intl/en_us/chrome/) (all OS) or [Chromium](https://www.chromium.org/getting-involved/download-chromium/) (just Linux, it doesn't work in Windows) web browser.
|
||||||
* (Only in Linux / macOS) Install [Xvfb](https://en.wikipedia.org/wiki/Xvfb) package.
|
* (Only in Linux / macOS) Install [Xvfb](https://en.wikipedia.org/wiki/Xvfb) package.
|
||||||
@@ -148,7 +154,8 @@ session. When you no longer need to use a session you should make sure to close
|
|||||||
| returnOnlyCookies | Optional, default false. Only returns the cookies. Response data, headers and other parts of the response are removed. |
|
| returnOnlyCookies | Optional, default false. Only returns the cookies. Response data, headers and other parts of the response are removed. |
|
||||||
| proxy | Optional, default disabled. Eg: `"proxy": {"url": "http://127.0.0.1:8888"}`. You must include the proxy schema in the URL: `http://`, `socks4://` or `socks5://`. Authorization (username/password) is not supported. (When the `session` parameter is set, the proxy is ignored; a session specific proxy can be set in `sessions.create`.) |
|
| proxy | Optional, default disabled. Eg: `"proxy": {"url": "http://127.0.0.1:8888"}`. You must include the proxy schema in the URL: `http://`, `socks4://` or `socks5://`. Authorization (username/password) is not supported. (When the `session` parameter is set, the proxy is ignored; a session specific proxy can be set in `sessions.create`.) |
|
||||||
|
|
||||||
:warning: If you want to use Cloudflare clearance cookie in your scripts, make sure you use the FlareSolverr User-Agent too. If they don't match you will see the challenge.
|
> **Warning**
|
||||||
|
> If you want to use Cloudflare clearance cookie in your scripts, make sure you use the FlareSolverr User-Agent too. If they don't match you will see the challenge.
|
||||||
|
|
||||||
Example response from running the `curl` above:
|
Example response from running the `curl` above:
|
||||||
|
|
||||||
@@ -238,13 +245,14 @@ Environment variables are set differently depending on the operating system. Som
|
|||||||
|
|
||||||
## Captcha Solvers
|
## Captcha Solvers
|
||||||
|
|
||||||
:warning: At this time none of the captcha solvers work. You can check the status in the open issues. Any help is welcome.
|
> **Warning**
|
||||||
|
> At this time none of the captcha solvers work. You can check the status in the open issues. Any help is welcome.
|
||||||
|
|
||||||
Sometimes CloudFlare not only gives mathematical computations and browser tests, sometimes they also require the user to
|
Sometimes CloudFlare not only gives mathematical computations and browser tests, sometimes they also require the user to
|
||||||
solve a captcha.
|
solve a captcha.
|
||||||
If this is the case, FlareSolverr will return the error `Captcha detected but no automatic solver is configured.`
|
If this is the case, FlareSolverr will return the error `Captcha detected but no automatic solver is configured.`
|
||||||
|
|
||||||
FlareSolverr can be customized to solve the captchas automatically by setting the environment variable `CAPTCHA_SOLVER`
|
FlareSolverr can be customized to solve the CAPTCHA automatically by setting the environment variable `CAPTCHA_SOLVER`
|
||||||
to the file name of one of the adapters inside the [/captcha](src/captcha) directory.
|
to the file name of one of the adapters inside the [/captcha](src/captcha) directory.
|
||||||
|
|
||||||
## Related projects
|
## Related projects
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "flaresolverr",
|
"name": "flaresolverr",
|
||||||
"version": "3.1.0",
|
"version": "3.1.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"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
bottle==0.12.25
|
bottle==0.12.25
|
||||||
waitress==2.1.2
|
waitress==2.1.2
|
||||||
selenium==4.8.2
|
selenium==4.8.3
|
||||||
func-timeout==4.3.5
|
func-timeout==4.3.5
|
||||||
# required by undetected_chromedriver
|
# required by undetected_chromedriver
|
||||||
requests==2.28.2
|
requests==2.28.2
|
||||||
|
|||||||
BIN
resources/flaresolverr_logo.ico
Normal file
BIN
resources/flaresolverr_logo.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.8 KiB |
@@ -56,18 +56,24 @@ def download_chromium():
|
|||||||
def run_pyinstaller():
|
def run_pyinstaller():
|
||||||
sep = ';' if os.name == 'nt' else ':'
|
sep = ';' if os.name == 'nt' else ':'
|
||||||
subprocess.check_call([sys.executable, "-m", "PyInstaller",
|
subprocess.check_call([sys.executable, "-m", "PyInstaller",
|
||||||
"--onefile",
|
"--icon", "resources/flaresolverr_logo.ico",
|
||||||
"--add-data", f"package.json{sep}.",
|
"--add-data", f"package.json{sep}.",
|
||||||
"--add-data", f"{os.path.join('dist_chrome', 'chrome')}{sep}chrome",
|
"--add-data", f"{os.path.join('dist_chrome', 'chrome')}{sep}chrome",
|
||||||
os.path.join("src", "flaresolverr.py")],
|
os.path.join("src", "flaresolverr.py")],
|
||||||
cwd=os.pardir)
|
cwd=os.pardir)
|
||||||
exe_folder = os.path.join(os.path.dirname(os.path.abspath(__file__)), os.pardir, 'dist')
|
|
||||||
exe_name = 'flaresolverr.exe' if os.name == 'nt' else 'flaresolverr'
|
|
||||||
exe_new_name = 'flaresolverr_windows_x64.exe' if os.name == 'nt' else 'flaresolverr_linux_x64'
|
def compress_package():
|
||||||
exe_path = os.path.join(exe_folder, exe_name)
|
dist_folder = os.path.join(os.path.dirname(os.path.abspath(__file__)), os.pardir, 'dist')
|
||||||
exe_new_path = os.path.join(exe_folder, exe_new_name)
|
package_folder = os.path.join(dist_folder, 'package')
|
||||||
shutil.move(exe_path, exe_new_path)
|
shutil.move(os.path.join(dist_folder, 'flaresolverr'), os.path.join(package_folder, 'flaresolverr'))
|
||||||
print("Executable path: " + exe_new_path)
|
print("Package folder: " + package_folder)
|
||||||
|
|
||||||
|
compr_format = 'zip' if os.name == 'nt' else 'gztar'
|
||||||
|
compr_file_name = 'flaresolverr_windows_x64' if os.name == 'nt' else 'flaresolverr_linux_x64'
|
||||||
|
compr_file_path = os.path.join(dist_folder, compr_file_name)
|
||||||
|
shutil.make_archive(compr_file_path, compr_format, package_folder)
|
||||||
|
print("Compressed file path: " + compr_file_path)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
@@ -83,4 +89,7 @@ if __name__ == "__main__":
|
|||||||
print("Building pyinstaller executable... ")
|
print("Building pyinstaller executable... ")
|
||||||
run_pyinstaller()
|
run_pyinstaller()
|
||||||
|
|
||||||
|
print("Compressing package... ")
|
||||||
|
compress_package()
|
||||||
|
|
||||||
# NOTE: python -m pip install pyinstaller
|
# NOTE: python -m pip install pyinstaller
|
||||||
|
|||||||
@@ -61,6 +61,10 @@ def controller_v1():
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
# check python version
|
||||||
|
if sys.version_info < (3, 9):
|
||||||
|
raise Exception("The Python version is less than 3.9, a version equal to or higher is required.")
|
||||||
|
|
||||||
# fix ssl certificates for compiled binaries
|
# fix ssl certificates for compiled binaries
|
||||||
# https://github.com/pyinstaller/pyinstaller/issues/7229
|
# https://github.com/pyinstaller/pyinstaller/issues/7229
|
||||||
# https://stackoverflow.com/questions/55736855/how-to-change-the-cafile-argument-in-the-ssl-module-in-python3
|
# https://stackoverflow.com/questions/55736855/how-to-change-the-cafile-argument-in-the-ssl-module-in-python3
|
||||||
|
|||||||
@@ -372,9 +372,10 @@ class Chrome(selenium.webdriver.chrome.webdriver.WebDriver):
|
|||||||
options.arguments.extend(["--no-sandbox", "--test-type"])
|
options.arguments.extend(["--no-sandbox", "--test-type"])
|
||||||
|
|
||||||
if headless or options.headless:
|
if headless or options.headless:
|
||||||
if self.patcher.version_main < 108:
|
v_main = int(self.patcher.version_main) if self.patcher.version_main else 108
|
||||||
|
if v_main < 108:
|
||||||
options.add_argument("--headless=chrome")
|
options.add_argument("--headless=chrome")
|
||||||
elif self.patcher.version_main >= 108:
|
elif v_main >= 108:
|
||||||
options.add_argument("--headless=new")
|
options.add_argument("--headless=new")
|
||||||
|
|
||||||
options.add_argument("--window-size=1920,1080")
|
options.add_argument("--window-size=1920,1080")
|
||||||
|
|||||||
Reference in New Issue
Block a user