fix(subscribestar): port gallery-dl content + preview-skip extraction (body bug) #121
Reference in New Issue
Block a user
Delete Branch "dev"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Every imported SubscribeStar post rendered its body as a bogus "264 / 265" (a pagination counter). This ports gallery-dl's exact
_data_from_postcontent rule and_media_from_postpreview guard.Root cause
Our balanced-
</div>body regex either returned empty or over-captured into sibling upload divs and theView next posts (N / M)pagination counter. Replaced with gallery-dl's literal delimiters: content between<div class="post-content" data-role="post_content-text">and</div><div class="post-uploads for-youtube", then strip the trix editor's<html><body>…</body></html>document wrapper to its inner. Verified against the live cheunart sample (clean per-post bodies; empty for genuinely text-less posts).Also (gallery-dl parity)
Port
_media_from_post's preview guard: skip gallery items whose URL is under/previews(locked/blurred teasers) — the SubscribeStar analog of the Patreon gated-preview bug (#874). A locked post now yields no downloadable media.Tests
Body must not bleed into the pagination counter; trix html-document wrapper stripped;
/previewsitems skipped. Fixture updated to include the youtube-uploads close marker present in real markup.Note
Fixes new walks only — already-imported cheunart posts need a recapture to rewrite their bodies. Remaining gallery-dl parity gaps tracked separately: doc/audio attachments (
uploads-docs/uploads-audios) and post tags.CI green on dev unit/lint/frontend (run 1239); integration in progress (slow runner).
🤖 Generated with Claude Code