From 8004d0a18380ff64a14e8e9148be849bca10abcd Mon Sep 17 00:00:00 2001 From: Nes370 Date: Sun, 11 Oct 2026 16:41:41 -0700 Subject: [PATCH] Update Mastodon.ts Cleaned up code a bit. --- src/engines/Mastodon.ts | 108 ++++++++++++++++------------------------ 1 file changed, 44 insertions(+), 64 deletions(-) diff --git a/src/engines/Mastodon.ts b/src/engines/Mastodon.ts index 539beed..355d398 100644 --- a/src/engines/Mastodon.ts +++ b/src/engines/Mastodon.ts @@ -1,77 +1,45 @@ -import { - ScrapeEngineBase, - ScrapeResult, - ScrapedPost, - ScrapeEngineFeature, - ContentType, -} from "../ScrapeEngine.js"; +import { ScrapeEngineBase, ScrapeResult, ScrapedPost, ScrapeEngineFeature, ContentType} from "../ScrapeEngine.js"; interface Attachment { - url: string; // original media URL, ?sensitive=true stripped + url: string; // original media URL contentType: ContentType; } -/** - * Handles Mastodon-compatible instances, including forks such as baraag.net. - * - * Mastodon renders media in three different shapes: - * - * 1. Images: - * - * - * - * → read the anchor href. - * - * 2. GIFVs: - * - * → read the