Skip to content

fix(16personalities): fix scraping logic#60

Open
rakuzen25 wants to merge 5 commits into
gh-metrics:masterfrom
rakuzen25:fix/plugin-16personalities
Open

fix(16personalities): fix scraping logic#60
rakuzen25 wants to merge 5 commits into
gh-metrics:masterfrom
rakuzen25:fix/plugin-16personalities

Conversation

@rakuzen25

@rakuzen25 rakuzen25 commented Jun 14, 2026

Copy link
Copy Markdown

Fixes lowlighter#1601. Dug around a little bit and changed the selectors to match the latest 16Personalities reports. The generated images for the placeholder profile are below:

test test2

They seem to compare pretty well to the original screenshot from lowlighter#1402.

There are some very hacky workarounds (e.g. avatars for personality types are no longer on the page and need to be constructed manually based on gender, which is extracted from the URL of the "Download fact sheet" button), but they seem to work at least for the time being, so hopefully that's OK.

image: /(?:fe)?male/i.exec(document.querySelector(".result__outline+div a.sp-button").href)[0],
text: document.querySelector("#intro .content__inner > div:first-child > p:first-of-type").innerText,
},
traits: [...document.querySelectorAll(".traitbox")].map(box => {
text: document.querySelector("#intro .content__inner > div:first-child > p:first-of-type").innerText,
},
traits: [...document.querySelectorAll(".traitbox")].map(box => {
const valueEle = box.querySelector(".traitbox__value")
const valueEle = box.querySelector(".traitbox__value")
const rawScore = valueEle.querySelector("span").innerText
return {
category: box.querySelector(".traitbox__label").innerText,
@github-actions

This comment has been minimized.

@rakuzen25 rakuzen25 marked this pull request as ready for review June 14, 2026 23:47
@rakuzen25

Copy link
Copy Markdown
Author

Hmm looks like I can't add reviewers myself, @lishaduck sry for the ping. Ty!

@github-actions

This comment has been minimized.

@lishaduck lishaduck self-requested a review June 26, 2026 19:48
check-spelling run (pull_request_target) for fix/plugin-16personalities

Signed-off-by: check-spelling-bot <check-spelling-bot@users.noreply.github.com>
on-behalf-of: @check-spelling <check-spelling-bot@check-spelling.dev>
@github-actions

This comment has been minimized.

@lishaduck lishaduck left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, and LGTM. Gotta fix these workflows (again) but content's great. Thanks for the contributions! Feels good to actually see another human on GH for once and not just yet-another-spammy-openclaw bot.

@github-actions

This comment has been minimized.

@rakuzen25

rakuzen25 commented Jun 27, 2026

Copy link
Copy Markdown
Author

Thanks for the review. Unfortunately AI tools are only as good as their users... It's hard to maintain open-source projects these days, thanks for your effort 🫡

@rakuzen25

Copy link
Copy Markdown
Author

@lishaduck By the way, I don't think I have access to approve workflows or merge (both this one and #61), so might still need your help with that. Cheers.

@lishaduck

Copy link
Copy Markdown
Member

I don't think I have access to approve workflows or merge

Yeah, I usually have enough confidence in my CI workflows' security I let anybody trigger them but I turned that off for this because they're 100% vulnerable, just haven't gotten the chance to tighten them up yet. Just triggered it, I'll merge once they're green.
I'll try to fix anything that comes up if I notice it fail, but feel free to clean it up yourself if you want it in sooner! This project is ~the bottom of my priorities list, I'm simply happy to help coordinate anybody who wants to help out (like you, thanks again!).

@rakuzen25

Copy link
Copy Markdown
Author

Ah crap, I thought merging main wouldn't have invalidated CI approvals (like code review approvals) but I guess I was wrong :( Might need another approval, my bad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants