feat: ddinstagram.com support

This commit is contained in:
hyperdefined 2024-03-25 13:32:28 -04:00
parent 8e1606f50c
commit 68d8fa1515
No known key found for this signature in database
GPG Key ID: EB0B55B31E88AB03
2 changed files with 7 additions and 0 deletions

View File

@ -77,6 +77,8 @@
}, },
"instagram": { "instagram": {
"alias": "instagram reels, posts & stories", "alias": "instagram reels, posts & stories",
"altDomains": ["ddinstagram.com"],
"subdomains": ["d", "g"],
"patterns": [ "patterns": [
"reels/:postId", "reel/:postId", "p/:postId", ":username/p/:postId", "reels/:postId", "reel/:postId", "p/:postId", ":username/p/:postId",
"tv/:postId", "stories/:username/:storyId" "tv/:postId", "stories/:username/:storyId"

View File

@ -64,6 +64,11 @@ export function aliasURL(url) {
if (url.hostname === 'dai.ly' && parts.length === 2) { if (url.hostname === 'dai.ly' && parts.length === 2) {
url = new URL(`https://dailymotion.com/video/${parts[1]}`) 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 return url