- lib/all.js +34 -0
lib/all.js
CHANGED
@@ -172,6 +172,39 @@ async function TwitterDownloaderV2(url) {
|
|
172 |
}
|
173 |
}
|
174 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
175 |
export {
|
176 |
facebookdl,
|
177 |
savefrom,
|
@@ -197,6 +230,7 @@ export {
|
|
197 |
TeraboxDownloader,
|
198 |
TeraboxV2Downloader,
|
199 |
TeraboxV3Downloader,
|
|
|
200 |
PinterestDownloader,
|
201 |
InstagramDownloader,
|
202 |
InstagramDLV2,
|
|
|
172 |
}
|
173 |
}
|
174 |
|
175 |
+
// please don't share here via API you need
|
176 |
+
async function TeraboxV4Downloader(url) {
|
177 |
+
try {
|
178 |
+
const apiUrl = `https://teraboxdownloaderonline.com/api/download-m3u8?terabox_link=${encodeURIComponent(url)}`;
|
179 |
+
const headers = {
|
180 |
+
"User-Agent": "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Mobile Safari/537.36",
|
181 |
+
"Referer": `https://teraboxdownloaderonline.com/player?url=${encodeURIComponent(url)}`,
|
182 |
+
};
|
183 |
+
const response = await axios.get(apiUrl, { headers });
|
184 |
+
const match = response.data.match("/#EXTINF:\d+,\s*(https[^\s]+)/");
|
185 |
+
if (match && match[1]) {
|
186 |
+
const result = {
|
187 |
+
status: "success",
|
188 |
+
video_url: match[1],
|
189 |
+
};
|
190 |
+
return result;
|
191 |
+
} else {
|
192 |
+
const errorResult = {
|
193 |
+
status: "error",
|
194 |
+
message: "Video URL tidak ditemukan.",
|
195 |
+
};
|
196 |
+
return errorResult;
|
197 |
+
}
|
198 |
+
} catch (error) {
|
199 |
+
const errorResult = {
|
200 |
+
status: "error",
|
201 |
+
message: "Terjadi kesalahan saat mengambil data.",
|
202 |
+
error: error.message,
|
203 |
+
};
|
204 |
+
return errorResult;
|
205 |
+
}
|
206 |
+
}
|
207 |
+
|
208 |
export {
|
209 |
facebookdl,
|
210 |
savefrom,
|
|
|
230 |
TeraboxDownloader,
|
231 |
TeraboxV2Downloader,
|
232 |
TeraboxV3Downloader,
|
233 |
+
TeraboxV4Downloader,
|
234 |
PinterestDownloader,
|
235 |
InstagramDownloader,
|
236 |
InstagramDLV2,
|