mirror of
https://github.com/imputnet/cobalt.git
synced 2025-07-17 18:58:33 +00:00
update
This commit is contained in:
parent
8c64127bbf
commit
89cdab70e2
@ -15,7 +15,7 @@
|
|||||||
"alias": "twitter videos & voice",
|
"alias": "twitter videos & voice",
|
||||||
"altDomains": ["x.com", "vxtwitter.com", "fixvx.com"],
|
"altDomains": ["x.com", "vxtwitter.com", "fixvx.com"],
|
||||||
"subdomains": ["mobile"],
|
"subdomains": ["mobile"],
|
||||||
"patterns": [":user/status/:id", ":user/status/:id/video/:v", ":user/status/:id/mediaViewer"],
|
"patterns": [":user/status/:id", ":user/status/:id/video/:v"],
|
||||||
"enabled": true
|
"enabled": true
|
||||||
},
|
},
|
||||||
"vk": {
|
"vk": {
|
||||||
|
@ -34,6 +34,12 @@ export function aliasURL(url) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case "twitter":
|
||||||
|
if (url.pathname.toLowerCase().endsWith('/mediaviewer')) {
|
||||||
|
url = new URL(`https://twitter.com/${parts[1]}/${parts[2]}/${parts[3]}`);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case "twitch":
|
case "twitch":
|
||||||
if (url.hostname === 'clips.twitch.tv' && parts.length >= 2) {
|
if (url.hostname === 'clips.twitch.tv' && parts.length >= 2) {
|
||||||
url = new URL(`https://twitch.tv/_/clip/${parts[1]}`);
|
url = new URL(`https://twitch.tv/_/clip/${parts[1]}`);
|
||||||
|
@ -11,6 +11,14 @@
|
|||||||
"code": 200,
|
"code": 200,
|
||||||
"status": "redirect"
|
"status": "redirect"
|
||||||
}
|
}
|
||||||
|
}, {
|
||||||
|
"name": "video with mobile web mediaviewer",
|
||||||
|
"url": "https://twitter.com/XSpaces/status/1526955853743546372/mediaViewer?currentTweet=1526955853743546372¤tTweetUser=XSpaces¤tTweet=1526955853743546372¤tTweetUser=XSpaces",
|
||||||
|
"params": {},
|
||||||
|
"expected": {
|
||||||
|
"code": 200,
|
||||||
|
"status": "redirect"
|
||||||
|
}
|
||||||
}, {
|
}, {
|
||||||
"name": "embedded twitter video",
|
"name": "embedded twitter video",
|
||||||
"url": "https://twitter.com/dustbin_nie/status/1624596567188717568?s=20",
|
"url": "https://twitter.com/dustbin_nie/status/1624596567188717568?s=20",
|
||||||
|
Loading…
Reference in New Issue
Block a user