mirror of
https://github.com/stashapp/CommunityScripts.git
synced 2026-04-12 18:57:14 -05:00
* Add GroupAutoScraper plugin: Automatically re-scrape groups with Adult Empire URLs to update tags and studio information. Includes main script, configuration files, and README documentation. * Add SceneBetterDetails plugin: Enhance scene details rendering by preserving line breaks. Includes JavaScript and YAML configuration files. * Removing new plugin to resolve old PR. * Removing static manifest file. Per DognaDragon it is created automatically. * Update GroupAutoScraper README and add requirements.txt - Added instructions for installing Python dependencies in the README. - Included a new requirements.txt file listing necessary packages: requests and stashapp-tools. - Updated README to clarify that the plugin works across environments with installed dependencies. * Update GroupAutoScraper README to correct plugin directory path --------- Co-authored-by: KennyG <kennyg@kennyg.com> Co-authored-by: DogmaDragon <103123951+DogmaDragon@users.noreply.github.com>
GroupAutoScraper
Automatically re-scrape groups that have a supported URL and merge the scraped data back into the group.
What it does
- Trigger
- Listens to the
Group.Create.Posthook only.
- Listens to the
- URL filter
- If the group has no URLs, the plugin exits quietly (no changes).
- If the first URL does not contain
adultdvdempire.com/, the plugin logs:AutoGroup only uses AdultDVDEmpire URLS. Exiting.and exits without making any changes.
- Scrape + merge
- When the first URL does contain
adultdvdempire.com/:- Calls
scrapeGroupURL(url)for that URL. - Merges scraped data into the group and performs a
GroupUpdate:- Uses scraped values when present, otherwise keeps existing values.
- Uses
scraped.studio.stored_idasstudio_idonly when it is notnull. - Builds
tag_idsfrom:- existing group tag IDs, plus
- scraped tag entries where
stored_idis notnull, - then de-duplicates.
- Only sends
front_image/back_imagewhen present in the scrape result so existing images are not overwritten withnull.
- Calls
- When the first URL does contain
- Summary logging
- On a successful update, the plugin logs a concise summary, e.g.:
Group 9681 'Women Seeking Women Vol. 101' updated. Added 4 tag(s), set studio.
- If a studio name is scraped but cannot be resolved (no
stored_id), the message instead reads:Group 9681 'Some Title' updated. Added 3 tag(s), could not set studio 'Some Studio', not found in studios.
- On a successful update, the plugin logs a concise summary, e.g.:
Groups without any URL, or with non-AdultDVD Empire URLs, are ignored without error.
Installation
-
Copy this folder to your Stash plugins directory, typically:
plugins/CommunityScripts/plugins/GroupAutoScraper/
-
Install Python dependencies. From this plugin's directory run:
pip install -r requirements.txtThis installs:
requestsstashapp-tools(which provides thestashapipackage used by the plugin)
-
Ensure the following files exist in this directory:
manifestGroupAutoScraper.ymlautoScraper.pyREADME.mdrequirements.txt
-
In Stash, open Settings → Plugins and reload or restart Stash so the plugin is detected.
You should then see GroupAutoScraper listed with a hook that triggers on Group.Create.Post.
Configuration
This plugin intentionally uses the server connection information provided by Stash:
- GraphQL URL, scheme, host and port come from the plugin input.
- Authentication uses the Stash session cookie provided in
server_connection.
As a result:
- No API keys or URLs need to be hard-coded or edited in the script.
- The plugin should work across environments as long as it is installed in the correct plugins directory and the Python dependencies are installed.