hcaptcha-challenger
hcaptcha-challenger copied to clipboard
feat(log): logger level
I wanted to make a suggestion to add a feature where we can toggle errors. Specifically in the core.classify function I get really annoyed because my program's console is flooded with "Types of challenges not yet scheduled" errors and it clutters my code. Of course the easiest solution would be to host the solver on a web server, but I still believe it should be a real function. An idea to toggling the logs would be:
challenger = solver.new_challenger(logs=False)
I have not found a way to toggle errors, but it is possible I missed something.
Ive used
loguru.logger.remove()
But i agree that this would be a nice option
@Vinyzu @bigboy-baby https://loguru.readthedocs.io/en/stable/overview.html#suitable-for-scripts-and-libraries
It looks like you can disable loguru logging like this:
logger.disable("my_library")
logger.disable("__main__")
logger.enable("__main__")
Debugging a headless browser is very difficult, so there must be necessary log output in the behavior chain. I will make related features as soon as possible, but if you are interested, you can PR (because there are obviously other higher priority features to be done)
In addition, Playwright can save browser recording information and XHR packet, which is very helpful for studying Captcha