Comments (25)
ah~ @Revadike I know what you mean, you need a cross programming language solution.
from hcaptcha-challenger.
Imitate and modify.
hcaptcha-challenger/src/apis/scaffold/challenge.py
Lines 18 to 75 in 7fc13d9
from hcaptcha-challenger.
from hcaptcha-challenger.
@M-Zubair10 in progress🐒
from hcaptcha-challenger.
from hcaptcha-challenger.
maybe u can also make a standalone proxy server exe/linux
from hcaptcha-challenger.
from hcaptcha-challenger.
@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.🤦♂️
from hcaptcha-challenger.
After a round of research I found that you guys are actually asking the same question...
from hcaptcha-challenger.
from hcaptcha-challenger.
这个项目名叫 hcaptcha-challenger
而非 hcaptcha-solver
。我的本意是搭建一个服务接口用以演示 YOLOv5(ONNX) 嵌入式解决方案
带来的提升,我只在乎识别的速度以及挑战的通过效率。
对于 @Revadike 这位老哥的问题,用什么方法对抗 hCaptcha 并不重要,重要的是获取挑战结束后返回的 TOKEN 。
对于 @M-Zubair10 的问题,如果你只是想在你编写的 selenium 程序里使用这个挑战方法,你可以按照我上面说的,根据 demo 改一下你的上下文业务既可。如果你要把它打包成 pypi,编码难度极高。
from hcaptcha-challenger.
from hcaptcha-challenger.
The project is called hcaptcha-challenger
, not hcaptcha-solver
, and my intention was to build a service interface to demonstrate the improvements made by the YOLOv5 (ONNX) embedded solution
, I only cared about the speed of recognition and the efficiency of passing challenges.
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.
from hcaptcha-challenger.
I meant like an API server
from hcaptcha-challenger.
@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 theWebDriver Options
; - and when you use
selenium
on linux, thelang of label
depends on the value of the process environment variableLANGUAGE
.
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.
from hcaptcha-challenger.
from hcaptcha-challenger.
For @Revadike,it doesn't matter what method is used against hCaptcha, it's important to get the TOKEN returned at the end of the challenge.
How can I get TOKEN from there?
I tried putting token = ctx.find_element_by_tag_name('iframe').get_attribute("data-hcaptcha-response")
after self.log("Challenge Success")
in core.py but it doesn't work.
from hcaptcha-challenger.
but it doesn't work.
@izoomrud sure
from hcaptcha-challenger.
but it doesn't work.
@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'))
.|.
from hcaptcha-challenger.
@izoomrud 有被可爱到,路漫漫其修远兮哈哈哈哈
from hcaptcha-challenger.
execute javascript to get the token.
just use getAttribute("data-hcaptcha-response") and then set the token to the webpage's title and do webdriver.title
and that will work
from hcaptcha-challenger.
execute javascript to get the token. just use getAttribute("data-hcaptcha-response") and then set the token to the webpage's title and do webdriver.title and that will work
yeah
from hcaptcha-challenger.
Well, what u can do is execute javascript in your webdriver. You can use the hcaptcha.getResponse()
method to get the response token, which you can then use in your script. The code should look like this.
token = ctx.execute_script("return hcaptcha.getResponse();")
from hcaptcha-challenger.
可以使用playwright吗
from hcaptcha-challenger.
可以使用playwright吗
一样的,思路都是在运行时判断是否遇到 challenge,然后用相应的接口处理。但现在这个项目我做成了 demo了,耦合性非常强,如果你要自己的项目中使用的话,目前只能照葫芦画瓢敲一个出来了,因为 selenium 和 playwright 的 api 完全不一样。
from hcaptcha-challenger.
Related Issues (20)
- [Challenge] [retrain] please click on the most similar object to the following reference shape
- [Challenge] [retrain] Please click on the object that appears only once
- feat(components): zero-shot object detection
- feat(control): nested CLIP candidates
- Can you give me an example code on using hcaptcha-challenger with selenium
- [Question] The project is failing 90% of the time because of new challenges HOT 15
- [Challenge] Please find and click on the letter K/W in the image below.
- [Challenge] Pleasae click at the star
- [Challenge] Please click each image containing a bumblebee
- Browserless Challenges HOT 1
- Solved
- google colab error
- url 'https://api.hcaptcha.com/getcaptcha/' returning base64 instead json HOT 9
- bug: workflow post-action
- feat(new-order): Integrated with LVM (large visual models) HOT 1
- [Challenge]
- feat(cloudflare-edge-node): FastAPI Python Workers
- feat(schema): Estimate Bottle Orientation with Computer Vision
- Solving captcha on queries
- use playwright dmmo question HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hcaptcha-challenger.