ArugaZ

Youtube Audio Downloader Rest API | ArugaZ

Jan 12th, 2021 (edited)
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const axios = require('axios');
  2.  
  3. function YoutubeAudio(QUERY) {
  4.     return new Promise((resolve, reject) => {
  5.         axios
  6.             .get('https://arugaz.my.id/api/media/ytaudio?url=' + encodeURIComponent(QUERY))
  7.             .then(req => {
  8.                 resolve(req.data)
  9.             })
  10.             .catch(reject)
  11.     })
  12. }
  13.  
  14. /*
  15. Website: https://arugaz.my.id
  16. Github: https://github.com/arugaz
  17. */
  18.  
  19. YoutubeAudio('https://youtu.be/6l5V3BWDcMw')
  20.     .then(res => console.log(res))
  21.     .catch(err => console.log(err))
Add Comment
Please, Sign In to add comment