Update lib/scrapper.js
Browse files- lib/scrapper.js +1 -1
lib/scrapper.js
CHANGED
@@ -26,7 +26,7 @@ const TiktokDownloader = async (url) => {
|
|
26 |
throw new Error("Invalid TikTok URL. Please provide a valid TikTok video link.");
|
27 |
}
|
28 |
|
29 |
-
const apiUrl = `https://${config.
|
30 |
console.log(apiUrl);
|
31 |
const response = await axios.get(apiUrl, {
|
32 |
headers: { 'Content-Type': 'application/json' }
|
|
|
26 |
throw new Error("Invalid TikTok URL. Please provide a valid TikTok video link.");
|
27 |
}
|
28 |
|
29 |
+
const apiUrl = `https://${config.TiktokUrl}/api/?url=${encodeURIComponent(url)}`;
|
30 |
console.log(apiUrl);
|
31 |
const response = await axios.get(apiUrl, {
|
32 |
headers: { 'Content-Type': 'application/json' }
|