Comments (20)
I am trying to edit the tag mapping.I didn't think anyone would pay attention to the project.(/β½οΌΌ)
from hcaptcha-challenger.
However, from the conclusion of my research, this i18n
compatibility is not an easy job.
On the PC, hCaptcha determines what language to use based on the browser's startup parameters, and on Linux it is based on the session window's locale
environment variable.
In addition, the tags given by hCaptcha may not be in the standard encoding format.You can run the following code in your favorite Python IDE, which is a very clever trick I found while researching how hCaptcha works.
print("AWESΞME" == "AWESOME")
print("bΡcycle" == "bicycle")
So, we need to write at least one adaptor function manually to convert these unusual characters.
from hcaptcha-challenger.
just change label_aliases and get_label function, since in my (russian) language we have different word endings u have to consider it into label_aliases.
worked perfectly fine for me
try:
_label = label_obj.text.split('Ρ ')[1]
except (AttributeError, IndexError):
self.label_alias = {
"Π²Π΅Π»ΠΎΡΠΈΠΏΠ΅Π΄Π°ΠΌΠΈ": "bicycle",
"ΠΏΠΎΠ΅Π·Π΄Π°ΠΌΠΈ": "train",
"Π³ΡΡΠ·ΠΎΠ²ΠΈΠΊΠ°ΠΌΠΈ": "truck",
"Π°Π²ΡΠΎΠ±ΡΡΠ°ΠΌΠΈ": "bus",
"Π°Π²ΡΠΎΠ±ΡΡΠ°ΠΌΠΈ": "bus",
"ΡΠ°ΠΌΠΎΠ»Π΅ΡΠ°ΠΌΠΈ": "aeroplane",
"Π»ΠΎΠ΄ΠΊΠ°ΠΌΠΈ": "boat",
"Π»ΠΎΠ΄ΠΊΠ°ΠΌΠΈ": "boat",
"ΠΌΠ°ΡΠΈΠ½Π°ΠΌΠΈ": "car",
"ΠΌΠΎΡΠΎΡΠΈΠΊΠ»Π°ΠΌΠΈ": "motorbike",
}
from hcaptcha-challenger.
Are you running on Linux? π
from hcaptcha-challenger.
nope
from hcaptcha-challenger.
Yes, this does solve the problem.
But I'm looking for a way to automatically adapt to the language and match the corresponding splitting function to the locale
environment variable.This doesn't look easy
from hcaptcha-challenger.
nope
Did you comment out this line of code? π
from hcaptcha-challenger.
the problem is, that some sites force language on hcaptcha, about the lang stuff: i use only antihcaptcha class
greasyfork hcaptcha solver script solves this problem by uploading target image to wolframimage or something like this, where they get keywords and then compare them with long list of built-in keywords
from hcaptcha-challenger.
stuff
The solution you propose seems to be quite time consuming. Note that the hCaptcha challenge has a time limit of roughly 130 seconds, and the page element will reset after that timeout.
force language
Yes, like EPIC login, they remove the checkbox and lock the element language.
regular
But if it's a regular hCaptcha it will have a section to switch the element language.
From the picture below you should understand why I wanted to unify the language in the first place. If we want to do adaptation, I think we need to rely on other modules, and the complexity of this split word is too terrible.
My idea was to find a way to use elements of a particular language in a variety of contexts. Once and for all.
from hcaptcha-challenger.
I've standardized the challenge language in the test cases and it works on all major operating systems. d6aa5ed
that some sites force language on hcaptcha
Could you provide some application scenarios or links about this situation?
from hcaptcha-challenger.
Hey what i meant is when changing Language the label doesnt get recognized.
And if u try to translate it with using self.label_alias not all aliases are included or correct
Do you understand what i mean?
And thanks for youre project i learned alot with it
from hcaptcha-challenger.
Hey what i meant is when changing Language the label doesnt get recognized.
So won't it be possible to identify accurately after the language is unified? π
And if u try to translate it with using self.label_alias not all aliases are included or correct
I don't quite understand the exact meaning of the phrase.
The purpose of self.label_alias
is not to translate, but to correct miscoding.
I did a lot of testing and I found that the number of image categories in hCaptcha is constant and that the tags are not completely random and "infinite".So, with this simple mapping, you can cover all the cases.
At certain fixed times of the day, the challenge labels encountered are the same.
from hcaptcha-challenger.
I mean when ur getting the label when its in english and than using self.label_alias
to get the correspondend chinese word so u can pass it to the image classificator .
It turned out that aeroplane in english is airplane on the label text
from hcaptcha-challenger.
I still don't understand what you mean...π€¦ββοΈ
I think you may not be reading the purpose of this variable. I have mentioned above. The purpose of self.label_alias is not to translate, but to correct miscoding.
from hcaptcha-challenger.
Oh, my God, there are three people talking in here! Now I know exactly what you need.
from hcaptcha-challenger.
I still don't understand what you mean...π€¦ββοΈ
I think you may not be reading the purpose of this variable. I have mentioned above. The purpose of self.label_alias is not to translate, but to correct miscoding.
Ah im an idiot . But when im trying to use an english label for example like 'train' for _label it doesnt work .
Image
from hcaptcha-challenger.
WHAT! What did you do with the source code. ππππ
from hcaptcha-challenger.
Ultimately, I think it's a pseudo-need. I don't think it should matter what language is used to open the challenge.
If you do have to start a challenge in a particular language for some indescribable reason, you can refer to this friend's approach and write your own splitting methods as well as label alias
.
A final reminder. The purpose of self.label_alias
is not to translate, but to correct miscoding. So, this layer of mapping must be present even if you open the challenge in English.
from hcaptcha-challenger.
if i use _label = label_obj.text.split()[-1]
i get the correct label but the programm doesnt work and the tactical_retreat function retuns True
from hcaptcha-challenger.
That's because you didn't add the cleansed noun to the self.label_alias
.
from hcaptcha-challenger.
Related Issues (20)
- [Challenge] default @ please click on the bell HOT 79
- [Challenge] Please select all images of one type that appear colder in comparison to other images HOT 58
- [Challenge] PIease select images of one type that appear colder in comparison to other images
- [Challenge] Please click on each image containing the largest animal in real world HOT 40
- [Challenge] default @ please click on the bee HOT 19
- [Challenge] Please click each image containing a freight train HOT 1
- [Challenge] Please click each image containing a pirate ship HOT 1
- [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 7
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.