post #9000000 GET!
Donmai

Artist tagging help

Posted under General

vipguy64 said:

What's a good name to use for lo_li_jefn8578? Right now it's the second half of their Pixiv display name + their stacc name. Their Twitter display name and handle are different from their Pixiv name.

欺负lo li: Qifu Lo Li
嘎嘎蛋糕: Gaga Dangao

Servai said:

Hi! I am wondering where I can find an artist's pixiv stacc username. An artist I am trying to create a tag for (the artist of https://danbooru.donmai.us/posts/8509006) already has their name being used by another artist of the same name so I need a qualifier to differentiate between the two artists.

When you click edit on the post and "Create new artist", you'll see the artist's stacc username in a link "https://www.pixiv.net/stacc/user_shmg5447". Danbooru will automatically use their stacc username as the artist tag. You can change it to add Kenbu before the stacc username as I mentioned in forum #321100.

To find the stacc username outside of doing that, when you're on the artist's Pixiv page their link is "https://www.pixiv.net/users/94567300". Change it to "https://www.pixiv.net/stacc/id/94567300" and click enter. That'll give you their stacc username. You can also use the Profile URLs Bookmarklet to find the stacc username.

Nameless_Contributor said:

You can use this bookmarklet while on a Twitter profile page:

javascript:(() => {prompt('Twitter ID', `https://twitter.com/intent/user?user_id=${JSON.parse(document.querySelector('script[data-testid="UserProfileSchema-test"]')?.textContent)?.author?.identifier}`)})()

(Select the entire text in the block above and drag it into the bookmark bar, then choose a name like Get Twitter ID)

This bookmarklet has proven very useful, but I've recently noticed it's no longer working. I assume the site changed something in how it serves this information. Does anyone have an updated version of this method?

Edit: THIS METHOD IS NOT RELIABLE AND PROBABLY NEVER WAS!
It can get the wrong user ID if you navigated within Twitter instead of directly opening the user profile in a new tab!

@anon7631

Do only use this after reloading the tab with the profile open
javascript:(() => {prompt('Twitter ID', `https://twitter.com/intent/user?user_id=${JSON.parse(document.querySelector('script[data-testid="UserProfileSchema-test"]')?.textContent)?.mainEntity?.identifier}`)})()

(author changed to mainEntity)

Updated

After misunderstanding a convo on discord... I thought I'd throw a bookmarklet. A little thicker then the above. Works on tweets and profiles from my brief testing. It only works on profile pages when logged out. But the above script seems to also fail on tweets when logged out due to lack of info to peak at. Can't speak to it being more reliable long term... (maybe? *flips coin*). Always validate sources and what not.

You could make this simpler as it seems the person making the tweet is always first... but this airs on the side of checking your work.

code
javascript:(() => {function getUserId(t){for(const e of document.querySelectorAll("[data-testid*='-unfollow']"))if(e.getAttribute("aria-label").split("@")[1]==t)return console.log(`${t} == ${e.getAttribute("data-testid").split("-")[0]}`),e.getAttribute("data-testid").split("-")[0];for(const e of document.querySelectorAll("[data-testid*='-follow']"))if(e.getAttribute("aria-label").split("@")[1]==t)return console.log(`${t} == ${e.getAttribute("data-testid").split("-")[0]}`),e.getAttribute("data-testid").split("-")[0]}prompt("Twitter ID",`https://twitter.com/intent/user?user_id=${getUserId(window.location.pathname.split("/")[1])}`);})()
test logged in
test logged out