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