From de69989bbeb4f7fd87d74963eb1d03c2cb5fb20f Mon Sep 17 00:00:00 2001 From: wukko Date: Mon, 10 Feb 2025 11:53:37 +0600 Subject: [PATCH] api/service-config/instagram: add support for more share links --- api/src/processing/service-config.js | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/api/src/processing/service-config.js b/api/src/processing/service-config.js index 3d382c69..1dc8bf30 100644 --- a/api/src/processing/service-config.js +++ b/api/src/processing/service-config.js @@ -35,14 +35,25 @@ export const services = { }, instagram: { patterns: [ - "reels/:postId", - ":username/reel/:postId", - "reel/:postId", "p/:postId", - ":username/p/:postId", "tv/:postId", + "reel/:postId", + "reels/:postId", "stories/:username/:storyId", - "share/:shareId" + + /* + share & username links use the same url pattern, + so we test the share pattern first, cuz id type is different. + however, if someone has the "share" username and the user + somehow gets a link of this ancient style, it's joever. + */ + + "share/:shareId", + "share/p/:shareId", + "share/reel/:shareId", + + ":username/p/:postId", + ":username/reel/:postId", ], altDomains: ["ddinstagram.com"], },