File size: 529 Bytes
0b51d18
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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 };