Skip to content

Commit

Permalink
tiktok: fix shortlink parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
dumbmoron committed May 21, 2024
1 parent 03b1248 commit 2831bc0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/modules/processing/services/tiktok.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ export default async function(obj) {
if (!html) return { error: 'ErrorCouldntFetch' };

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
}
}
Expand Down

0 comments on commit 2831bc0

Please sign in to comment.