Transform Flaresolverr into a python (pip) package #1603
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR consists of 2 commits (for now). The first one is mostly an updated version of the 3 years old #651 pull request.
The second commit exports some basic functions, so they can be called directly from the python package, without having to start a HTTP web server.
srcdirectory toflaresolverr__init__file to export functionality for other python libraries.flaresolverr.pystarter script to the root of the git repositoryflaresolverrlogger (imported from V3beta - Python improvements #567). This makes it possible for packages to hide flaresolverr logsThe changes make it possible to install FlareSolverr as a python package, and solve a challenge directly using python code, without having to start a web server. For example:
I didn't want to change too much of the original code, so most of the functions exposed by the package are the functions currently used by Flaresolverr. In the future, a proper, package oriented API design should be considered, but I think that's out of scope for this PR for now.
Tested the build process and Cloudflare challange solving on