Skip to content

Better selectors for Eureka and Bozja information #12

Open
@karashiiro

Description

@karashiiro

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions