NOTE ON JAVASCRIPT CODE SNIPPET!: You may want to take the tag extractor javascript code to ChatGPT to clean up. This article is not allowing it to be formatted properly. I would copy the below code snippet to chatgpt and prompt "Can you clean up this snippet? I'm looking to make a tag extractor for danbooru and safebooru and the formatting on this is off slightly". Whatever works.
Nothing much here, just showcasing how to make a tag extractor for booru sites to automatically capture tags you can immediately copy into your generators (or anywhere you want to store them).
SFW Booru Alternative: Safebooru
Tag extractor Javascript code: javascript:(async()=>{try{const id=location.pathname.match(//posts/(\d+)/)?.[1];if(!id){alert("Not a Danbooru post");return;}const res=await fetch[https://danbooru.donmai.us/posts/${id}.json);const;const)](https://danbooru.donmai.us/posts/${id}.json[);const](https://danbooru.donmai.us/posts/${id}.json`);const)) data=await res.json();const all=[data.tagstringartist,data.tagstringcopyright,data.tagstringcharacter,data.tagstringgeneral,data.tagstringmeta].join(%27 %27).split(/\s+/).filter(Boolean);const out=all.join(%27, %27);await navigator.clipboard.writeText(out);alertCopied ${all.length} tags!);}catch(e){console.error(e);alert("Failed");}})();
Step 1: Create a bookmark. The website you're on doesn't matter. After that, find the bookmark in your browser and right click it --> choose "edit". A new popup with a few fields should show up. Edit the name to whatever you'd like. Edit the URL to the tag extractor Javascript code above and then hit save.
Step 2: Now the bookmark is live. You can test it on any non booru site. It should throw a popup error in the syntax of "(website) says "Not a Danbooru post"".
Step 3: Find a post you want to try and make from either of the above booru sites. Find your bookmark and click on it. You should get a message that states "copied X tags!", X being the number of tags on the page that were copied.
Step 4: Now the tags are in your clipboard. You can paste them anywhere to save them for later, or into your generator and use them right away.
NOTE 1!: Even though the javascript states "danbooru", it will actually work on safebooru as well. It will not, however, work on other similar booru sites like r34, e621, etc. You'd have to make your own for those sites IF you want to try them. Personally I've tried other sites and they don't tag in a way that is meant to be taken over to an ai generator. If you're fine with more barebones tagging, you can try making tag extractors for those sites as well.
NOTE 2!: Feel free to take the javascript to chatgpt, or if you know how, edit it yourself. This way you can remove things you don't need, like the artist name, (language) commentary, signature/text/watermark, etc. for faster copying/pasting into generating.
NOTE 3!: The tag extractor bookmark works on Chrome and Firefox. Tested it. Not sure about Safari, Opera or any other browsers (and definitely not any other OS). If it doesn't, just let Chatgpt know it doesn't work for your browser and/or OS and it should spit out one that is compatible with it.

