diff --git a/src/engines/Mastodon.ts b/src/engines/Mastodon.ts index 0cbcf55..541febd 100644 --- a/src/engines/Mastodon.ts +++ b/src/engines/Mastodon.ts @@ -7,26 +7,34 @@ import { } from "../ScrapeEngine.js"; interface Attachment { - url: string; // original URL, ?sensitive=true stripped - previewUrl?: string; // local cached preview (for video posters) + url: string; // original media URL, ?sensitive=true stripped + previewUrl?: string; // poster / cached preview (for video posters) contentType: ContentType; } /** * Handles Mastodon-compatible instances, including forks such as baraag.net. * - * On a Mastodon post page, media is rendered as: - * + * Mastodon renders media in three different shapes: * - * The anchor href is the original (often federated) file. The is a - * scaled-down local cache. We read the anchor href, never the img src. + * 1. Images: + * + * + * + * → read the anchor href. * - * Multi-image posts repeat the same structure; we return one ScrapedPost - * per anchor, matching how Pixiv/Twitter engines behave. + * 2. GIFVs: + * + * → read the