This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(add): pypi release #16
Comments
Hello, I just wondered if you had any plans to enable multi threading for this. For my custom use case, it seems that the "Image Downloader" makes this incompatible due to the asyncio loop structure. Unfortunately, I do not have the skills to modify this myself and was left wondering if this could be a useful feature for other people too. |
?👀 |
For example, when I try the captcha challenge in a function, such as the following:
I receive the following error: "RuntimeError: There is no current event loop in thread 'Thread-2 (job_func)". I tried the following for
Apologize for my lack of experience but hopefully you understand :) |
def run_threaded(job_func):
job_thread = threading.Thread(target=job_func)
job_thread.start()
job_thread.join()
run_threaded(job_func) |
if "win" in sys.platform:
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
asyncio.run(ImageDownloader(docker=docker_).subvert(workers="fast"))
else:
loop = asyncio.get_event_loop()
loop.run_until_complete(
ImageDownloader(docker=docker_).subvert(workers="fast")
) |
Thank you so much for taking the time to look at this for me. Your examples work well and I am able to run the function in a thread now. Unfortunately, my goal doesn't seem possible. I was hoping to be able to run multiple threads simultaneously which is why I never used |
我认为有多种方案可以实现你所谓的“异步协同”,此外,使用“协程异步”替代“线程异步”能在这类场景中争取到更多的资源利用率。但为了避免所谓的“滥用”我觉得我不能至少不应该在这种场合将“高性能”的并发方案公之于众。如果你想在你自己的项目中使用 hcaptcha-challenger 你应该知道怎么修改代码。 |
Thank you for your response. I understand what you mean, unfortunately since this is out of my scope I think I'll have to wait until I have further knowledge of Python. None the less, I appreciate you taking the time to reply. |
@GoldDust69 纸上得来终觉浅 绝知此事要躬行 |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
We will release the heterogeneous scaffolding in
v1.0
and upload the project package to pypi platform, then players can usepip
to install and usehcaptcha-challenger
.But before that, we will absorb as many suggestions from players as possible, and we will also re-standardize the model of the scaffolding interface so that it can be called in various suitable occasions.
The text was updated successfully, but these errors were encountered: