-
-
Notifications
You must be signed in to change notification settings - Fork 255
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
[Question] How to use this with selenium-python on my current page? #23
Comments
Imitate and modify. hcaptcha-challenger/src/apis/scaffold/challenge.py Lines 18 to 75 in 7fc13d9
|
Can you make standalone class like class.solve() to solve captcha on
current page
…On Sun, Mar 27, 2022, 2:41 PM QIN2DIM ***@***.***> wrote:
Imitate and modify.
https://github.com/QIN2DIM/hcaptcha-challenger/blob/7fc13d9e193ea8cb527af91d3bbf1737d1ac10c4/src/apis/scaffold/challenge.py#L18-L75
—
Reply to this email directly, view it on GitHub
<#23 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALL7Y5C5OZLDJJPRN3VDWALVCAUM7ANCNFSM5RYRAYHQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
@M-Zubair10 in progress🐒 |
Thanks a lot.
…On Sun, Mar 27, 2022, 7:18 PM QIN2DIM ***@***.***> wrote:
@M-Zubair10 <https://github.com/M-Zubair10> in process🐒
—
Reply to this email directly, view it on GitHub
<#23 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALL7Y5DVNVR4H5L4ZVIFEM3VCBU27ANCNFSM5RYRAYHQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
maybe u can also make a standalone proxy server exe/linux |
Nah!
I only need to use it during my webscraping in selenium
So needed a pypi release with function solve to automatically solve captcha
on current selenium page
I actually done this with yolov3 using image ai but the result ratio is 2
out of 5 which is bad, your model is quite good but i can't load it in
imageai since i don't have a knowledge of tensorflow, keras for now.
…On Mon, Mar 28, 2022, 8:54 AM Revadike ***@***.***> wrote:
maybe u can also make a standalone proxy server exe/linux
—
Reply to this email directly, view it on GitHub
<#23 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALL7Y5HURWPAG3SPYSZUBBTVCEUNVANCNFSM5RYRAYHQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@M-Zubair10 The solution for this project uses the ONNX compression model, and you can call it directly using the opencv-python interface without caring about the details of deep learning. If you look at requirement.txt, you will see that torch or tensorflow is missing. @M-Zubair10 @Revadike btw I don't have a good grasp of pypi and container server, which will take some time to learn. and then, I've been busy with school lately, so I may not be able to push it anytime soon.🤦♂️ |
After a round of research I found that you guys are actually asking the same question... |
I don't know, we just want ease to use it with our program right?
Can you tell me how you detect object in image, so that i will make a class
with pypi release
…On Tue, Mar 29, 2022, 6:48 PM QIN2DIM ***@***.***> wrote:
After a round of research I found that you guys are actually asking the
same question...
—
Reply to this email directly, view it on GitHub
<#23 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALL7Y5HFAQUYOCMJIG2HHGTVCMCZ5ANCNFSM5RYRAYHQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
这个项目名叫 对于 @Revadike 这位老哥的问题,用什么方法对抗 hCaptcha 并不重要,重要的是获取挑战结束后返回的 TOKEN 。 对于 @M-Zubair10 的问题,如果你只是想在你编写的 selenium 程序里使用这个挑战方法,你可以按照我上面说的,根据 demo 改一下你的上下文业务既可。如果你要把它打包成 pypi,编码难度极高。 |
Can you again send this in english?
…On Tue, Mar 29, 2022, 7:02 PM QIN2DIM ***@***.***> wrote:
这个项目名叫 hcaptcha-challenger 而非 hcaptcha-solver。我的本意是搭建一个服务接口用以演示 YOLOv5(ONNX)
嵌入式解决方案 带来的提升,我只在乎识别的速度以及挑战的通过效率。
对于 @Revadike <https://github.com/Revadike> 这位老哥的问题,用什么方法对抗 hCaptcha
并不重要,重要的是获取挑战结束后返回的 TOKEN 。
对于 @M-Zubair10 <https://github.com/M-Zubair10> 的问题,如果你只是想在你编写的 selenium
程序里使用这个挑战方法,你可以按照我上面说的,根据 demo 改一下上下文业务既可。如果你要把它打包成 pypi,编码难度极高。
—
Reply to this email directly, view it on GitHub
<#23 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALL7Y5BLT7NOZYEJBV2VX73VCMEP5ANCNFSM5RYRAYHQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
The project is called To @Revadike, it doesn't matter what method is used against hCaptcha, what matters is getting the TOKEN returned at the end of the challenge. To @M-Zubair10, if you just want to use this challenge method in your selenium application, you can change your contextual business according to the demo as I mentioned above. If you want to package it as a pypi, it's extremely difficult to code. |
I meant like an API server |
ah~ @Revadike I know what you mean, you need a cross programming language solution. |
@M-Zubair10 ah - - I think I didn't express my meaning accurately. The coding difficulty I mentioned yesterday is mainly due to the fact that
Obviously all such recognition operations involve label matching, and if the label text is translated into other languages because of multilingual issues, not only will the model fail, but the whole challenge logic will be seriously flawed. I would like to make this solution available to developers using a variety of languages with a single set of code, however, the two factors I just mentioned that determine the |
Thank you for the clarification.
…On Wed, Mar 30, 2022, 10:07 AM QIN2DIM ***@***.***> wrote:
@M-Zubair10 <https://github.com/M-Zubair10> ah - - I think I didn't
express my meaning accurately.
The coding difficulty I mentioned yesterday is mainly due to the fact that
hcaptcha-challenger cannot be started in various selenium contexts.
Because the challenge label is multilingual, when you use selenium on a PC
to trigger the challenge, the lang of label depends on the --lang
parameter of the WebDriver Options, and when you use selenium on linux,
the lang of label depends on the value of the process environment
variable LANGUAGE.
Obviously all such recognition operations involve label matching, and if
the label text is translated into other languages because of multilingual
issues, not only will the model fail, but the whole challenge logic will be
seriously flawed.
I would like to make this solution available to developers using a variety
of languages with a single set of code, however, the two factors I just
mentioned that determine the lang of label are set before the WebDriver
starts. To reference hcaptcha-challenger's method in the process for a
challenge, you would have to do redundant transcoding, which is unnecessary.
—
Reply to this email directly, view it on GitHub
<#23 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALL7Y5H4TZCUJ6GPUPHPIWLVCPOQRANCNFSM5RYRAYHQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
How can I get TOKEN from there? I tried putting |
@izoomrud sure |
ctx.switch_to.default_content()
time.sleep(3)
token = ctx.find_elements(By.XPATH, "//iframe[@title='widget containing checkbox for hCaptcha security challenge']")
for value in token:
file = open('token.txt', 'a')
file.write(value.get_attribute('data-hcaptcha-response')) .|. |
@izoomrud 有被可爱到,路漫漫其修远兮哈哈哈哈 |
execute javascript to get the token. |
yeah |
Well, what u can do is execute javascript in your webdriver. You can use the token = ctx.execute_script("return hcaptcha.getResponse();") |
可以使用playwright吗 |
一样的,思路都是在运行时判断是否遇到 challenge,然后用相应的接口处理。但现在这个项目我做成了 demo了,耦合性非常强,如果你要自己的项目中使用的话,目前只能照葫芦画瓢敲一个出来了,因为 selenium 和 playwright 的 api 完全不一样。 |
How to use this with selenium-python on my current page?
The text was updated successfully, but these errors were encountered: