Skip to content
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

Better selectors for Eureka and Bozja information #12

Open
karashiiro opened this issue Nov 25, 2021 · 0 comments
Open

Better selectors for Eureka and Bozja information #12

karashiiro opened this issue Nov 25, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@karashiiro
Copy link
Member

Currently, the selectors used for Eureka and Bozja fail if only one of the two pieces of content are unlocked.

Below is a section of the ClassJob page with both unlocked:
image

And here's one with only one:
image

The current selectors for these are located here:

"BOZJA": {
"LEVEL": {
"selector": "div.character__job__list:nth-child(7) > div:nth-child(2)"
},
"METTLE": {
"selector": "div.character__job__list:nth-child(7) > div:nth-child(4)",
"regex": "(?P<Mettle>\\S+) \\/"
},
"NAME": {
"selector": "div.character__job__list:nth-child(7) > div:nth-child(3)"
}
},
"EUREKA": {
"EXP": {
"selector": "div.character__job__list:nth-child(9) > div:nth-child(4)",
"regex": "(?P<CurrentEXP>\\S+) \\/ (?P<MaxEXP>\\S+)"
},
"LEVEL": {
"selector": "div.character__job__list:nth-child(9) > div:nth-child(2)"
},
"NAME": {
"selector": "div.character__job__list:nth-child(9) > div:nth-child(3)"
}
},

The problem is that the :nth-child pseudoclass can't account for either content section being missing, and no alternatives seem to be able to do so either. The :first-of-type pseudoclass doesn't apply to classes, only elements. This Stack Overflow question's answers discuss this in more detail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant