Skip to content

Add GroupAutoScraper plugin#682

Open
Stash-KennyG wants to merge 1 commit intostashapp:mainfrom
Stash-KennyG:main
Open

Add GroupAutoScraper plugin#682
Stash-KennyG wants to merge 1 commit 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant