From 68d8fa1515fab4d68126828737ad11e35cc321f5 Mon Sep 17 00:00:00 2001 From: hyperdefined Date: Mon, 25 Mar 2024 13:32:28 -0400 Subject: [PATCH] feat: ddinstagram.com support --- src/modules/processing/servicesConfig.json | 2 ++ src/modules/processing/url.js | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/src/modules/processing/servicesConfig.json b/src/modules/processing/servicesConfig.json index 4f07ebda..886c44b9 100644 --- a/src/modules/processing/servicesConfig.json +++ b/src/modules/processing/servicesConfig.json @@ -77,6 +77,8 @@ }, "instagram": { "alias": "instagram reels, posts & stories", + "altDomains": ["ddinstagram.com"], + "subdomains": ["d", "g"], "patterns": [ "reels/:postId", "reel/:postId", "p/:postId", ":username/p/:postId", "tv/:postId", "stories/:username/:storyId" diff --git a/src/modules/processing/url.js b/src/modules/processing/url.js index b272ff80..11f073d1 100644 --- a/src/modules/processing/url.js +++ b/src/modules/processing/url.js @@ -64,6 +64,11 @@ export function aliasURL(url) { if (url.hostname === 'dai.ly' && parts.length === 2) { url = new URL(`https://dailymotion.com/video/${parts[1]}`) } + case "ddinstagram": + if (services.instagram.altDomains.includes(url.hostname)) { + url.hostname = 'instagram.com' + } + break; } return url