Transform Flaresolverr into a python (pip) package#1603
Open
Smart123s wants to merge 4 commits intoFlareSolverr:masterfrom
Open
Transform Flaresolverr into a python (pip) package#1603Smart123s wants to merge 4 commits intoFlareSolverr:masterfrom
Smart123s wants to merge 4 commits intoFlareSolverr:masterfrom
Conversation
Co-authored-by: Christoph Wegener <cwegener@users.noreply.github.com> Co-authored-by: HLFH <github@dhautefeuille.eu>
Move web server startup to separate function This makes it possible to call FlareSolverr functions directly from python code without having to start up a webserver.
added custom flaresolverr logger, avoiding to have to disable other loggers cli logging setup (eg format, log level) is only run when script is actually started from the cli Co-authored-by: M4RC0Sx <marcos3as3@gmail.com>
229059b to
a96bc2a
Compare
Contributor
|
@ilike2burnthing any updates on this? This would be pretty good to be honest. |
a96bc2a to
cf80059
Compare
Author
|
Rebased the branch on master to resolve a simple merge conflict with the readme file. |
Contributor
|
This is a substantial change which will not be done by me, I'd need the owner to take a look when they have time. Please don't ping for updates, it's a waste of everyone's time. If there were updates on a PR or issue, you'd see a comment to that effect. |
fb8abed to
4440ee5
Compare
4440ee5 to
a11e4a8
Compare
a11e4a8 to
0a70859
Compare
…etter error handling
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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