Organizing SFM/Animated Content With Funscripts in Stash

The Who:

This is for those of us gooners who like an organized porn library, even more so for those of us who like an organized library with a solid amount of animated SFM content.

This is also way overkill i’m well aware, my goal is to make this easy for new people and eventually have enough of a database/infrastructure to share it so users just need to press a single button.

For now however, this does require a fair amount of effort so it’s only for people who care enough to set it all up.


The What:

A Beautifully Crafted Library Interface:

Scene Gallery Viewer:

Performer Gallery Viewer:

Features:

1. Details For Your videos:

Animators, Characters, File Details, Voice Actors, Scripters, Nut Button, Franchise/Universe, Tags for sorting, Link Photo Galleries to Videos (as seen in Anis screenshot below), and Heatmaps.

Examples:





2. A linked ecosystem:

Click on a character from a scene and you can immediately view your other videos with them. You can do the same with Animator, Voice Actor, Universe/Franchise, etc.. Want to see every Zenless Zone Zero video you have without placing them all in one folder? Easy. Want to find every video you have animated by the goat BlobCG? One click away.

Examples:

Ahri Performer Scenes:

BlobCG Videos:

Zenless Zone Zero Videos:


3. Modular and Customizable:

Don’t like my methods? That’s totally fine, choose any pfp you want for characters, auto generate your own thumbnails, swap out Groups mapped to franchise and instead make groups based on boob size. It’s all in your hands, do what you want.

Examples:



4. Compatibility:

View via Heresphere, Phone, Desktop, Smart TV, Smart Fridge(idk about this one). Use multi-axis devices (SR6, OSR2), single-axis devices(SR1, The Handy), or no devices!(why are you on eroscripts then?)

Stash VR
StashVR Enhancements
Linking MFP to stash(Multi-Axis)


5. Automation in all the Right Ways:

Stash uses real magic! (phashes) To automatically search their extensive databases to pull all the information the gooner side of the internet has gathered for your scenes. The only drawback is it’s mostly catered to IRL content. Don’t worry though I have built custom scrapers for Eroscripts and WikiMedia to aid you in your goal of having organized Fictional Women(or Men, for the gay bros) added to your library.

Examples:

My Scene Scraper:

My Performer Scraper:


The Why(skippable):

Let me preface this by saying I have been on a mission the last week trying to organize my library with stash, only to find very little support for animation/SFM and scripted content. I love anime boobs/CGI tiddies too much to let it slide, so I started formatting a method to use Stash’s built in organizational features to cater to animated content.

This was cool until I started manually gathering the data for Scenes, Performers, Animators, Voice Actors. The first day I spent 4-5 hours gathering info on maybe 25 scenes/performers? I looked at my library of over 1800 individual scripted scenes and knew I had to do something different. In order to make the process of pulling information easier, I created a few scrapers that help me in automating information gathering from Eroscripts and Wiki sites.

I had minimal python experience going into this attempt so I heavily relied on VSCode’s Github Copilot to create these, you are more than welcome to change these however you want to fit your needs.

That being said they’re semi functional for what I needed them for, albeit niche for most users I would say. It still requires a fair amount of effort to get your scene fields fully populated as you’ll see in the workflow. The good news is, stash has plenty of automated features for you to leverage if you don’t want to go all OCD on it. You can have a fully functional, tagged, and sorted library with cover images and videos in as little as a few hours for a small library.

I focused heavily on trying to curate my library to cater to Animation content, as that’s what stash lacks the most support for. For normal scenes I use the already available databases like StashDB PornDB JAVDB etc. and manually credit funscripters as available. These already available Databases via the install guide will pull and populate most IRL content scenes, especially professional, with a click of a button.

The Where:

Links:

My Scrapers (WikiMedia and Eroscripts):

Mega

There is no malware but you should ALWAYS run your unverified downloads through

VirusTotal

or something similar to scan before running the scripts.


Stash Installation Guide:

Official Guide

Stash VR

StashVR Enhancements

Linking MFP to stash(Multi-Axis)

More information on Scrapers:

CommunityScrapers Repo

Official Guide

The How:

Core Logic For The Eroscripts Scraper (skippable):

Logic
Title:

Logic:

The scraper pulls from fancy_title in the json, it removes any special characters, it also removes anything in parenthesis/brackets/etc.

in the event of “&” or “+” sign used, it replaces them with “and”. Hyphens like “this-is-a-title” get replaced with whitespace “this is a title”

It appends the animator’s name it parses to the beginning of the filtered title, this is how I like my library structured but it’s pretty easy to remove if you don’t like it.

examples:
https://discuss.eroscripts.com/t/multi-axis-sugardust-ellen-joe-mall/263153

Title: [multi-axis]sugardust- Ellen Joe Mall

Becomes: [Sugardust] Ellen Joe Mall

https://discuss.eroscripts.com/t/exga-nier-automata-yorha-no-6-no-21-threesome-multi-axis-script/99907

Title: (Exga) Nier Automata- Yorha no.6 & no 21 Threesome (Multi Axis Script)

Becomes: [Exga] Nier Automata- Yorha no.6 and amp; no 21 Threesome

(Still need to fix hyphen removal a bit)

https://discuss.eroscripts.com/t/derpixon-mystery-bang-hq-full-script/127336

Title: (Derpixon) MYSTERY BAND (HQ Full Script)
Becomes: [Derpixon] MYSTERY BANG


URL's:

Logic:

The scraper pulls every link it can find in the post and applies a few filters, first it removes any internal links to eroscripts, you already have the link to scrape with URL.

Then it applies a whitelist filter including common filesharing sites and public public release sites, there’s a lot so I won’t list them. It does not include common irl porn sites like xnxx etc. so it’ll probably fail to grab those URL’s.

Then it applies a blacklist removing any links with the original posters name in them, if someone wants patreon links to the scripter they can add it in but I usually don’t.

It then applies another filter to prioritize any link that has the animator’s name in it, (i.e patreon.com/Animator) and Rule34Video links. I set it up like this so I can find the animator easily and use my Rule34Video scraper as needed.

The last rule sets a limit on links to two maximum, so it doesn’t flood your stash with links

Examples:

  1. https://discuss.eroscripts.com/t/derpixon-mystery-bang-hq-full-script/127336

Grabs:
https://derpixon.newgrounds.com/
Mystery Bang [Derpixon][4K][ENG-SUB]

  1. https://discuss.eroscripts.com/t/multi-axis-sugardust-ellen-joe-mall/263153

Grabs:
https://x.com/sugardusth?lang=zh
Ellen Joe Mall [Sugardust]


Date:

Pretty obvious how this one works, original post date, it does ensure the format matches stash though


Director:

Pulls the Original Scriptors “name:” field from the json, falls back to “username:” field if it returns null

I wanted a place to credit scripter, not sure if i’ll keep this long term though, as i’m afraid it will conflict with actual directors in the future. I have them credited in bio if I end up removing it.


Performers and Groups:

I got nothing on this, and I am lost how I could even implement it to begin with.

I use Performers to add in fictional characters in my stash and I add corresponding Universes under Groups.

So from the above examples I add “Ellen Joe” under performers and use the fandom scraper I made to pull character data from the wiki.

Then I add Zenless Zone Zero as a Group and apply it.

It honestly comes out looking clean as hell 10/10 would recommend, but I cannot for the life of me figure out how I would parse out that data for a scene from an eroscripts json. I doubt it’s really viable tbh


Tags:

Take a wild guess.

I did add one tag for my library that gets added to every pull though

“Scripted”

so I can filter by interactive and missing funscripts, it’s easily removable though.


Details:

Logic:

The randomness of how details is often used here made me create my own template, the bio is redone to match "{Title} created by {Animator}, scripted by {Original Poster}. I still need to polish this to handle missing animators and other weird quirks. I also need to change it for when the script is ran against non animated topics.

Examples:

  1. https://discuss.eroscripts.com/t/multi-axis-sugardust-ellen-joe-mall/263153

Becomes:
"Ellen Joe Mall created by Sugardust, scripted by Macykwok.

  1. https://discuss.eroscripts.com/t/derpixon-mystery-bang-hq-full-script/127336

Becomes:
"MYSTERY BANG created by derpixon, scripted by bekscript.


Animator

Logic:
Not even a question this is the messiest piece in the script.First it checks for animator only tags like “MMD, SFM, Hentai, CGI, Animation, and Cartoon” it only pulls animator if one of those are present. Then it attempts to pull the animator from three places in a total of 4 ways. It does so in this order for priority.

  1. Regex matching common phrases in the description like “created by”, “animator:” “support the creator” and a bunch others that I found in the 20 or so posts I used to create it.

  2. If it doesn’t pull from the description it attempts to pull it from the links, I used a bunch of common creator platforms like patreon, newgrounds, pixiv, fanbox, etc.. It filters those out by OP’s username and removes those links. What’s left might be the animator, but i’ve also seen it be random 3rd party patreons or the OP’s if their username doesn’t match their patreon.

To counter that it also runs a quick check against the title, if any links match a name in the title it prioritizes those.

  1. If both those fail it pulls from the title, looking for [Animator], (Animator) tags priority early to late in appearance.

  2. if all three fail it tries to pull from the first word in the title.

  3. If all fail or if the tags are missing it returns None

Example:

https://discuss.eroscripts.com/t/derpixon-mystery-bang-hq-full-script/127336

Identifies: Derpixon

https://discuss.eroscripts.com/t/seventyfive-belle-ellen-joe-suggested/277338

identifies: SeventyFive

https://discuss.eroscripts.com/t/exga-nier-automata-yorha-no-6-no-21-threesome-multi-axis-script/99907

Identifies: Exga


Image

Logic:
It creates a blacklist of GIF’s, AVIF’s, and emojis, they end up looking shit in stash and I prefer to use stash’s built in generator. First it tries to pull thumbnail, if that fails it looks for internally uploaded images in order of appearance in the json. I find it helped avoid incorrect thumbnails doing this. Unfortunately I still get incorrect thumbnails constantly and have to make my own most of the time.

Examples:

https://discuss.eroscripts.com/t/multi-axis-sugardust-ellen-joe-mall/263153

pulls(incorrect): “https://eroscripts-discourse.eroscripts.com/original/4X/c/a/f/cafd23274da9682554ea4b28eb7f7e69ddafb2be.png

https://discuss.eroscripts.com/t/derpixon-mystery-bang-hq-full-script/127336

pulls (incorrect): “https://eroscripts-discourse.eroscripts.com/original/3X/d/9/d90898280a292277df375a016b00ce0bcfa1cb4d.png


Installation:

I will not be creating this guide for installing stash, use the guide linked above for that. This guide assumes

  • You have a fully functional install of stashapp

  • You are at least “semi” aware of core navigation and features

  • You have properly mapped and scanned your library/porn scenes into stash already


Step 1 Adding my Scrapers
  • Download my scraper folders from the Mega Link (scan them for malware, it’s good practice).

  • Navigate to Settings :right_arrow: Metadata Providers :right_arrow: Available Scrapers and install “py_common” and any other scrapers you might want. I use Rule34Video a lot, as it tends to work well with eroscript posts. Read their documentation for proper configuration if you want to use it.

  • Navigate to your stash folder for data, this will heavily depend on how you set up your install, but for a general to exact location go to Settings :right_arrow: System :right_arrow: Scrapers Path and navigate to that directory.

Default path /Path/To/Your/App/stash/scrapers/community/{ScraperFolders}

  • Place my Eroscripts and MediaWiki folders with the other scrapers.

  • Navigate to Settings :right_arrow: Plugins :right_arrow: Available plugins and install whatever plugins you want (there’s some great UI QOL like glassy pack and rightclicksuite I recommend) along with “python tools installer”.

  • After reloading plugins you’ll have a new option under Settings :right_arrow: Tasks called “Install Python Tools”, run it.


Step 2 Configuration

Eroscripts:

We need to grab your personal cookies for eroscripts and add them into eroscripts.yaml

You can grab the cookies via

It is preferable to grab the cookies from a headless browser or curl commands from the machine you host stash from though. Cookies refresh too often via normal browser, and you may find it only functional for a few days or even hours if you often VPN or clear cache on your browser. Mine did it constantly while building the script.

To fix this I used curl with my login info saved to the environment.
(Should work on Linux or Mac, although you would need to adjust it for powershell I think)

Input your own username and password for

  • export EROSCRIPTS_USER=‘username’
  • export EROSCRIPTS_PASS=‘PASSWORD’ or ‘HASHED PASSWORD’
exact commands I used
sudo apt update && sudo apt install -y jq

export EROSCRIPTS_USER='username'
export EROSCRIPTS_PASS='PASSWORD' or 'HASHED PASSWORD'

CK="eroscripts_cookies.txt"

BASE="https://discuss.eroscripts.com"

UA="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120 Safari/537.36"

curl -s -c "$CK" -b "$CK" -A "$UA" "$BASE/session/csrf.json" | jq -r '.csrf' | tee csrf.txt
CSRF=$(cat csrf.txt)

curl -s -c "$CK" -b "$CK" -A "$UA" \
  -H "Referer: $BASE/login" \
  -H "Origin: $BASE" \
  -H "X-Requested-With: XMLHttpRequest" \
  -H "X-CSRF-Token: $CSRF" \
  -H "Content-Type: application/json" \
  --data-binary "{\"login\":\"$EROSCRIPTS_USER\",\"password\":\"$EROSCRIPTS_PASS\"}" \
  "$BASE/session" | tee login_resp.json

jq . login_resp.json

curl -s -c "$CK" -b "$CK" -A "$UA" "$BASE/session/current.json" | jq -r '.current_user.username'
#Will print username if it worked

grep -P '\t(_t|_forum_session)\t' eroscripts_cookies.txt
#will print the cookies

When you finish running these commands it will print out stable “_forum_session” and “_t” cookies for you. Place these values in Eroscripts → eroscripts.yaml here

  • –cookie=_t=[EXAMPLECOOKIE-REMOVEBRACKETS]
  • –cookie=_forum_session=[EXAMPLECOOKIE-REMOVEBRACKETS]
    save the file.

Reload scrapers at Settings → Metadata Providers → “Reload Scrapers”

MediaWiki

Good news, mediawiki requires no cookies so hopefully you won’t have to deal with CLI at all.

There is a config file at config.json.example though, default values are not set up for animation content because i’m trying to prep the scraper for submitting to the official repo and they have guidelines to follow.

My suggestion is to grab the config file and rename it to “config.json” omit “.example”

Open up the file and change a few settings, explanations of each are in the file so feel free to customize as needed.

My personal preferences:

“map_race_to_ethnicity”: true

“map_universe_to_disambiguation”: true

“max_description_length”: 2200

“extract_categories”: false

“approximate_birthdate”: true

“add_universe_to_tags”: true

“fictional_character_features”: true

After the config json is configured and saved you’re done with the files!

Reload scrapers at Settings → Metadata Providers → “Reload Scrapers”


Step 3 Usage of the Scrapers:

Eroscripts:

Grab a matching eroscripts URL for a scene, in this example we’ll use
Macykwok’s scene here:

Navigate to the Scene:


Paste the URL and Click Scrape logo next to the URL:


The scene details will parse what it can gather from Eroscripts, the logic is good but not great, You will probably need to make fine adjustments to the input fields.


In this example I need to adjust Capitalization in the title only.


MediaWiki:

Right now MediaWiki is Performer Only. To use it, navigate to a scrapable performer and their MediaWiki link. These can normally be found at {fanfom}.fandom.com/wiki/ . But it supports a shitload more, check the .yaml for the full list. In this example we’ll continue with Nyotengu from Dead or Alive.


Paste the URL and click scrape


This one is WAY more advanced than Eroscripts but it’s also more finicky. Please remember it’s a WIP.


Common Issues:

These are in their early stages, i’m still working on improving them slowly. These are some issues I noted while building.

Eroscripts:

  1. Scene title or description looks odd/ incorrect grammar.
  • The scraper parses the title and removes special characters, it attempts to find the animators name and append it to the beginning of the title in brackets. If an animator fails to be found that can lead to some odd quirks like “{Scene Title} animated by None. Scripted by Nodnil.”

  • Fix is to just manually edit it before or after import until I can improve the logic

  1. Bad image/thumbnail pull
  • There’s logic to prevent GIF’s/AVIF’s from being pulled, that leads to some scenes not pulling a thumbnail related to the scene at all. To fix just don’t import/ delete the thumbnail imported and generate your own through stash. You can also use R34Video scraper to pull a thumbnail.
  1. It pulls the wrong name for the scripter
  • The scraper pulls user: field from the json and only falls back to username: if necessary. I.e Nodnil first oppositeodd second. This is intended but feel free to manually input the field.
  1. The script fails to pull “x” even though it’s on the page
  • It’s not perfect sorry, some things are hard to pull for every instance.

MediaWiki:

  1. The script fails to pull “x” even though it’s on the page
  • It’s not perfect sorry, some things are hard to pull for every instance.
  1. I don’t like the mappings of race to ethnicity or franchise to disambiguation.
  • Turn off the settings in config.json
  1. I can’t scrape the wiki page, the icon is grayed out
  • test a {fandom}.fandom.com/wiki page, if that works check the allowed domains in the yaml, the site not be supported or added yet. If it fails troubleshoot your scraper configuration and triple check there’s no misaligned spacing in the yaml. Stash fails to parse if the spacing isn’t right.
  1. Wrong image/incorrect fields
  • it’s not perfect and this one is even more of a WIP than eroscripts.

My Workflow For Organizing

After using the scrapers I like to do a few more things that you may or may not also want to do. Eventually i’ll automate these as well but it’s all still a work in progress.

After Eroscripts:

  • If you have R34 video scraper, eroscripts scraper will prioritise R34Video links and populate them below in URL’s. You can immediately run that scraper to pull even more info for your video automatically, it’s particularly good for pulling thumbnails, mine is kinda ass at it rn.

  • Add Performers, both voice actor and fictional character. In the above example after running the scraper I added Nyotengu and AlyNSFW, you can usually find voice actor credits on twitter via the animators post.

  • Add Franchise/Universe under “Group” in stash, in the above example I added “Dead or Alive”

  • The scraper attempts to pull animator using complex logic but it still fails from time to time. If it does add in the animator to “Studio”.

  • Go through the newly added Studio, Group, and Performers and add pictures for them, it makes it look hella nice. VA’s and Animators I usually grab their twitter avatars, Franchise I use the official logo, and performer photos will auto scrape from wiki but if you want to choose a custom one do that too.


On the todo list:

  1. Add support for cross referencing from your stash library added performers to the eroscript JSON, if it matches performers like “Jane Doe Cowgirl”. Add Jane Doe to performers in the scene data.

  2. Do the same for added Groups, attempt to parse out universes like Genshin Impact, ZZZ, Overwatch etc.

  3. refine animator pulling

  4. Fix image pulling by converting a static image from a gif

  5. Support Group scraping with the wiki, create x.com scraping for animators and more auto scene data

  6. Add the scrapers to the official repository after I make them more compliant with normal field inputs.


More Screenshots:

Scene Overview:


Scene Details:


Performers:

14 Likes

Really love the UI style you have especially for the scenes tab, was curious if you could share the plugins/custom CSS you use to get it to look like that with the tags/performers and such underneath the scene.

2 Likes

I experimented with a bunch of different plugins, and i’m still experimenting with them. What i’m currently using to change UI is

  • ColorCodedTags (Community Plugins)

  • Glassy Pack / Glassy pack add ons (Serechops Repo)

  • Right Click Suite (Serechops Repo)

  • CJ’s Card Tweaks (Community Repo) (Banner/File count on, Performer tweak off)

  • Floating Scene Player (Codddarrr Repo)

  • External Links Enhanced (Community Repo)

You might need to play around with Glassy pack and it’s modifications a bit, they have a bunch of little tweaks you can make to personalize it more.

2 Likes

goat :folded_hands:

2 Likes

Very cool guide! Stash is such a powerful tool. I dived into it couple months ago, to bring more organisation to my library. I come from a time where we downloaded videos, because streaming wasn’t as reliable back in the days and we liked to keep everything saved ^^

I then started using Stash. If you are into organising and min-maxing, you’ll get highly addictive to Stash ^^ I spent hours making it perfect. I created all the tags I wanted, created the performers, rated them, added tags for them, created images for performers, created gifs for the tags and so and so on. Then I added some plugins, customized these as well. So much fun to work on it and tweak it for perfection. The good thing is, you’ll find something to make even better.

Stash is pretty much like your porn site with your own content on it. That’s what makes it so fun. If you know how to code, you can even write your own plugins or create your themes and style using CSS (I’m not one of them and rely on community plugins ^^).

I love how you organised and styled your Stash. Looks very neat and well organised.
On the top right corner I see “Tag Manager”. Is that some plugin you use? Tried to find it, but nothing came up. I’m curious about that, since I love to make my tag system better.

1 Like

Yeah I’ve been experimenting with it a bit, you can customize CSS on a per tag basis. Allowing you to create color codes or emphasize one tag/group more. I still haven’t figured out how I want to utilize it yet, but it will probably be some variation of high medium low priority grouping.

Exact plugin name is

Stash Tag Custom Colors (Serechops Repo)

1 Like

Thank you! Pretty interesting, I try to experiment with it a bit.

1 Like

very cool, I’m new to stash and I’m loving it, how do you put these background covers for artists and studios??

1 Like

I usually just set them manually. Click on the performer and select edit, add cover from file. If you can’t be bothered to do that, the WikiMedia scraper is usually pretty good about pulling the default portrait.

If you’re wondering where to find good portraits, you can always try R34.

I mean the cover that is behind the artist’s image and information, mine doesn’t have this option to customize this, it must be some plugin

1 Like

Ah yeah it is a plugin you’re right. It’s called “Video Banner” and is located in the community plugins repo.