mirror of
https://github.com/imputnet/cobalt.git
synced 2025-01-01 12:46:07 +00:00
tiktok: fix shortlink parsing
This commit is contained in:
parent
03b1248b5f
commit
2831bc06ad
|
@ -20,7 +20,8 @@ export default async function(obj) {
|
||||||
if (!html) return { error: 'ErrorCouldntFetch' };
|
if (!html) return { error: 'ErrorCouldntFetch' };
|
||||||
|
|
||||||
if (html.startsWith('<a href="https://')) {
|
if (html.startsWith('<a href="https://')) {
|
||||||
const { patternMatch } = extract(html.split('<a href="https://')[1].split('?')[0]);
|
const extractedURL = html.split('<a href="')[1].split('?')[0];
|
||||||
|
const { patternMatch } = extract(extractedURL);
|
||||||
postId = patternMatch.postId
|
postId = patternMatch.postId
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue