Skip to content

Xvideos: harden fragment ID extraction and fallback#2735

Open
smegmarip wants to merge 1 commit into
stashapp:masterfrom
smegmarip:xvideo-scraper-update
Open

Xvideos: harden fragment ID extraction and fallback#2735
smegmarip wants to merge 1 commit into
stashapp:masterfrom
smegmarip:xvideo-scraper-update

Conversation

@smegmarip

@smegmarip smegmarip commented May 6, 2026

Copy link
Copy Markdown
Contributor

Changes:

  • Add numeric-leading JDownloader filename rule: ^([0-9]{6,11})_.+ -> $1.
  • Keep alphanumeric-leading rule separate and dot-prefixed: ^([a-z0-9]{6,11})_.+ -> .$1.
  • Preserve yt-dlp bracketed ID rule with dot-prefixed replacement.
  • Tighten fallback extension cleanup to probable extensions only: (?i).*.[a-z0-9]{1,5}$ -> .
  • Update scraper timestamp comment to May 6, 2026.

Risks / assumptions:

  • ID lower bound remains 6 for compatibility with existing plugin behavior.
  • Numeric and alphanumeric collision handling depends on rule order (numeric rule intentionally first).
  • Unknown filename formats that miss all ID rules still fall back to video./x behavior (pre-existing).
  • If very short dot-suffix IDs (<=5) exist in the future, fallback may treat them as extensions.

Generated by an automatic template. Can be removed if not applicable.

Scraper type(s)

  • performerByName
  • performerByFragment
  • performerByURL
  • sceneByName
  • sceneByQueryFragment
  • sceneByFragment
  • sceneByURL
  • groupByURL
  • galleryByFragment
  • galleryByURL
  • imageByFragment
  • imageByURL

Examples to test

30107781_culona en el gym perfecta.mp4
24205607_culo gym.mp4
uukvteb9147_Young Fashion Model Turned Humiliated Bondage Slave.mp4

Short description

Describe the general changes

Changes:

- Add numeric-leading JDownloader filename rule: ^([0-9]{6,11})_.+ -> $1.
- Keep alphanumeric-leading rule separate and dot-prefixed: ^([a-z0-9]{6,11})_.+ -> .$1.
- Preserve yt-dlp bracketed ID rule with dot-prefixed replacement.
- Tighten fallback extension cleanup to probable extensions only: (?i).*\.[a-z0-9]{1,5}$ -> .
- Update scraper timestamp comment to May 6, 2026.

Risks / assumptions:

- ID lower bound remains 6 for compatibility with existing plugin behavior.
- Numeric and alphanumeric collision handling depends on rule order (numeric rule intentionally first).
- Unknown filename formats that miss all ID rules still fall back to video./x behavior (pre-existing).
- If very short dot-suffix IDs (<=5) exist in the future, fallback may treat them as extensions.
@feederbox826

feederbox826 commented May 6, 2026

Copy link
Copy Markdown
Member

only clear likely file extensions (1-5 chars), not "."

then add it to the previous regexes.

@smegmarip

Copy link
Copy Markdown
Contributor Author

only clear likely file extensions (1-5 chars), not "."

then add it to the previous regexes.

If I do, then non-matches will pass the entire input filename to the xvideo api. Are you ok with that?

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.

2 participants