snapchat: clean up

This commit is contained in:
wukko 2024-07-25 11:58:43 +06:00
parent 83af16bb12
commit a388839e15
No known key found for this signature in database
GPG key ID: 3E30B3F26C7B4AA2
2 changed files with 14 additions and 14 deletions

View file

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

View file

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