ryu-js / lib /@randydev /terabox.js
randydev's picture
Create terabox.js
0b51d18 verified
raw
history blame
529 Bytes
import axios from 'axios';
import { trbtoken, trbrul } from '../config.js';
async function TeraboxDownloader(url) {
const options = {
method: 'POST',
url: `${trbrul}/fetch`,
headers: {
'x-rapidapi-key': trdl,
'x-rapidapi-host': trbrul,
'Content-Type': 'application/json'
},
data: { url: url }
};
try {
const response = await axios.request(options);
console.log(response.data);
} catch (error) {
console.error(error);
return null;
}
}
export { TeraboxDownloader };