Giter Site home page Giter Site logo

Comments (20)

QIN2DIM avatar QIN2DIM commented on May 22, 2024

I am trying to edit the tag mapping.I didn't think anyone would pay attention to the project.(/β–½οΌΌ)

from hcaptcha-challenger.

QIN2DIM avatar QIN2DIM commented on May 22, 2024

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.

saitishmukhametov avatar saitishmukhametov commented on May 22, 2024

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.

QIN2DIM avatar QIN2DIM commented on May 22, 2024

Are you running on Linux? πŸ‘€

from hcaptcha-challenger.

saitishmukhametov avatar saitishmukhametov commented on May 22, 2024

nope

from hcaptcha-challenger.

QIN2DIM avatar QIN2DIM commented on May 22, 2024

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.

QIN2DIM avatar QIN2DIM commented on May 22, 2024

nope

Did you comment out this line of code? πŸ‘€

options.add_argument("--lang=zh-CN") # ε―θƒ½δ»…εœ¨ Windows η”Ÿζ•ˆ

from hcaptcha-challenger.

saitishmukhametov avatar saitishmukhametov commented on May 22, 2024

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.

QIN2DIM avatar QIN2DIM commented on May 22, 2024

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.

hcaptcha-language-switcher1

from hcaptcha-challenger.

QIN2DIM avatar QIN2DIM commented on May 22, 2024

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.

skrrppop avatar skrrppop commented on May 22, 2024

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.

QIN2DIM avatar QIN2DIM commented on May 22, 2024

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.

skrrppop avatar skrrppop commented on May 22, 2024

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.

QIN2DIM avatar QIN2DIM commented on May 22, 2024

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.

QIN2DIM avatar QIN2DIM commented on May 22, 2024

Oh, my God, there are three people talking in here! Now I know exactly what you need.

from hcaptcha-challenger.

skrrppop avatar skrrppop commented on May 22, 2024

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

Screenshot_1
)

from hcaptcha-challenger.

QIN2DIM avatar QIN2DIM commented on May 22, 2024

WHAT! What did you do with the source code. πŸ˜‚πŸ˜‚πŸ˜‚πŸ˜‚

from hcaptcha-challenger.

QIN2DIM avatar QIN2DIM commented on May 22, 2024

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.

skrrppop avatar skrrppop commented on May 22, 2024

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.

QIN2DIM avatar QIN2DIM commented on May 22, 2024

That's because you didn't add the cleansed noun to the self.label_alias.

from hcaptcha-challenger.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.