From c9947fc75de3de865d3ee0d5bfde45cdf45a53b3 Mon Sep 17 00:00:00 2001 From: wukko Date: Sun, 28 Jan 2024 13:23:00 +0600 Subject: [PATCH] tiktok: fix photo link parsing --- src/modules/processing/services/tiktok.js | 5 +++-- src/modules/processing/servicesConfig.json | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/modules/processing/services/tiktok.js b/src/modules/processing/services/tiktok.js index 0da62a1e..4743667a 100644 --- a/src/modules/processing/services/tiktok.js +++ b/src/modules/processing/services/tiktok.js @@ -35,10 +35,11 @@ export default async function(obj) { redirect: "manual", headers: { "user-agent": userAgent } }).then((r) => { return r.text() }).catch(() => { return false }); + if (!html) return { error: 'ErrorCouldntFetch' }; - if (html.slice(0, 17) === '