merge: api 10.9.3 from main

This commit is contained in:
wukko
2025-04-24 16:27:17 +06:00
4 changed files with 5 additions and 4 deletions

View File

@ -116,6 +116,7 @@ export const services = {
"add/:username",
"u/:username",
"t/:shortLink",
"o/:spotlightId",
],
subdomains: ["t", "story"],
},

View File

@ -78,5 +78,5 @@ export const testers = {
"xiaohongshu": pattern =>
pattern.id?.length <= 24 && pattern.token?.length <= 64
|| pattern.shareId?.length <= 12,
|| pattern.shareId?.length <= 24,
}

View File

@ -102,10 +102,10 @@ export default async function (obj) {
params = await resolveRedirectingURL(`https://t.snapchat.com/${obj.shortLink}`);
}
if (params.spotlightId) {
if (params?.spotlightId) {
const result = await getSpotlight(params.spotlightId);
if (result) return result;
} else if (params.username) {
} else if (params?.username) {
const result = await getStory(params.username, params.storyId, obj.alwaysProxy);
if (result) return result;
}