snapchat: add support for android short links

This commit is contained in:
wukko 2024-08-03 16:50:57 +06:00
parent 417a21ea91
commit bef9b5b172
No known key found for this signature in database
GPG key ID: 3E30B3F26C7B4AA2
3 changed files with 4 additions and 6 deletions

View file

@ -193,10 +193,7 @@ export default async function(host, patternMatch, lang, obj) {
r = await dailymotion(patternMatch);
break;
case "snapchat":
r = await snapchat({
hostname: url.hostname,
...patternMatch
});
r = await snapchat(patternMatch);
break;
case "loom":
r = await loom({

View file

@ -91,7 +91,8 @@ export const services = {
"add/:username/:storyId",
"u/:username/:storyId",
"add/:username",
"u/:username"
"u/:username",
"t/:shortLink",
],
subdomains: ["t", "story"],
},

View file

@ -69,7 +69,7 @@ async function getStory(username, storyId) {
export default async function (obj) {
let params = obj;
if (obj.hostname === 't.snapchat.com' && obj.shortLink) {
if (obj.shortLink) {
const link = await getRedirectingURL(`https://t.snapchat.com/${obj.shortLink}`);
if (!link?.startsWith('https://www.snapchat.com/')) {