mirror of
https://github.com/imputnet/cobalt.git
synced 2025-07-18 19:28:29 +00:00
improve domain handling
This commit is contained in:
parent
bf1876f8b4
commit
1d39bdd7aa
@ -78,7 +78,8 @@
|
|||||||
},
|
},
|
||||||
"instagram": {
|
"instagram": {
|
||||||
"alias": "instagram reels, posts & stories",
|
"alias": "instagram reels, posts & stories",
|
||||||
"altDomains": ["ddinstagram.com", "d.ddinstagram.com", "g.ddinstagram.com"],
|
"subdomains": ["d", "g"],
|
||||||
|
"altDomains": ["ddinstagram.com"],
|
||||||
"patterns": [
|
"patterns": [
|
||||||
"reels/:postId", ":username/reel/:postId", "reel/:postId", "p/:postId", ":username/p/:postId",
|
"reels/:postId", ":username/reel/:postId", "reel/:postId", "p/:postId", ":username/p/:postId",
|
||||||
"tv/:postId", "stories/:username/:storyId"
|
"tv/:postId", "stories/:username/:storyId"
|
||||||
|
@ -64,9 +64,10 @@ 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]}`)
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
case "ddinstagram":
|
case "ddinstagram":
|
||||||
if (services.instagram.altDomains.includes(url.hostname)) {
|
if (services.instagram.altDomains.includes(host.domain) && (host.subdomain === null || services.instagram.subdomains.includes(host.subdomain))) {
|
||||||
url.hostname = 'instagram.com'
|
url.hostname = 'instagram.com';
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user