Skip to content

Add GroupAutoScraper plugin#682

Open
Stash-KennyG wants to merge 2 commits intostashapp:mainfrom
Stash-KennyG:main
Open

Add GroupAutoScraper plugin#682
Stash-KennyG wants to merge 2 commits intostashapp:mainfrom
Stash-KennyG:main

Conversation

@Stash-KennyG
Copy link
Contributor

Summary

Adds GroupAutoScraper, an external (raw) plugin that automatically re-scrapes newly created groups when their first URL is an AdultDVD Empire link, then merges the scraped metadata back into the group.

What it does

  • Trigger: Group.Create.Post only (no update trigger).
  • URL filter: Only processes groups whose first URL contains adultdvdempire.com/. Others log an info message and exit without changes.
  • Flow: Calls scrapeGroupURL(url), then builds a GroupUpdate payload by merging scraped data with existing group data:
    • Prefers scraped values when present; otherwise keeps existing.
    • Uses scraped.studio.stored_id as studio_id only when not null; otherwise keeps existing studio or leaves unset.
    • Merges tag IDs: existing group tags + scraped tags with non-null stored_id, de-duplicated.
    • Sends front_image / back_image only when the scrape returns them (avoids overwriting with null).
  • Logging: Uses stashapi.log and prints a short summary on success (e.g. added tag count, whether studio was set or could not be resolved).

Files added

  • plugins/GroupAutoScraper/GroupAutoScraper.yml – plugin config and hook
  • plugins/GroupAutoScraper/autoScraper.py – main script (stashapi + requests)
  • plugins/GroupAutoScraper/manifest – plugin manifest
  • plugins/GroupAutoScraper/README.md – install and behavior docs

Requirements

  • Python 3.7+
  • stashapi and requests (same as other CommunityScripts Python plugins)

Testing

  • Verified with Stash plugin UI: hook fires on group create.
  • Only AdultDVD Empire URLs are scraped; other URLs log and exit.
  • Success path logs summary with tag count and studio status.

…t Empire URLs to update tags and studio information. Includes main script, configuration files, and README documentation.
@Stash-KennyG
Copy link
Contributor Author

Group.Create.Post is a valid trigger. This validation rule appears to be out of date.

Copy link
Contributor

@DogmaDragon DogmaDragon Mar 15, 2026

Choose a reason for hiding this comment

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

Should be removed as it gets created automatically as part of the plugin installation when using remote source.

@DogmaDragon
Copy link
Contributor

Could you also create requirements.txt to make it easier for Docker users?

Documentation mentions only requests module as required, but it also imports from stashapi.

@DogmaDragon DogmaDragon added type:plugin Plugins object:group Affects or is triggered by group object labels Mar 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

object:group Affects or is triggered by group object type:plugin Plugins

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants