wolfyflutter

ytmp3.ing [youtube] [downloader] [audio] [video] [api.ytmp3.ing]

Jul 10th, 2025
252
0
Never
9
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JavaScript 2.67 KB | Source Code | 0 0
  1. /*
  2.   base            : https://ytmp3.ing/
  3.   by              : wolep
  4.   last update     : 19 May 2025 - 07:00
  5.   auditional note : sorry kalau code nya jelek :v, maklum masih belajar ehee
  6. */
  7.  
  8. (async () => {
  9.  
  10.   // main function
  11.   const ytmp3ing = async (youtubeUrl, format = "mp3") => {
  12.  
  13.     // param 1 validation
  14.     const regYoutubeId = /https:\/\/(www.youtube.com\/watch\?v=|youtu.be\/|youtube.com\/shorts\/|youtube.com\/watch\?v=)([^&|^?]+)/
  15.     const videoId = youtubeUrl.match(regYoutubeId)?.[2]
  16.     if (!videoId) throw Error("invalid youtube link")
  17.  
  18.     // param 2 validation
  19.     const availableFormat = ["mp3", "mp4"]
  20.     const formatIndex = availableFormat.findIndex(v => v == format.toLocaleLowerCase())
  21.     if (formatIndex == -1) throw Error(`${format} is invalid format, available format : ${availableFormat.join(", ")}. pick one!`)
  22.     const choosenUrlPath = ["/audio", "/video"][formatIndex]
  23.  
  24.     const getCookieAndToken = async () => {
  25.       const res = await fetch("https://ytmp3.ing/")
  26.       if (!res.ok) throw Error(`gagal fetch ${res.url} status ${res.status} ${res.statusText}`)
  27.       const cookie = res.headers.getSetCookie() // [1 cookie csrftoken=tog1sW4B6...]
  28.       const html = await res.text()
  29.       const csrfmiddlewaretoken = html.match(/value="([^"]+)"/)?.[1] //1ayShcZ1K3
  30.       if (!csrfmiddlewaretoken) throw Error(`gagal mendapatkan csrfmiddlewaretoken`)
  31.       console.log("got cookie and csrfmiddleware token")
  32.       return { cookie, csrfmiddlewaretoken }
  33.     }
  34.  
  35.     const { cookie, csrfmiddlewaretoken } = await getCookieAndToken()
  36.  
  37.     const res2 = await fetch("https://ytmp3.ing" + choosenUrlPath, {
  38.       "headers": {
  39.         "content-type": "multipart/form-data; boundary=----WebKitFormBoundaryeByWolep",
  40.         "x-csrftoken": csrfmiddlewaretoken,
  41.         "cookie": cookie,
  42.       },
  43.       "body": "------WebKitFormBoundaryeByWolep\r\nContent-Disposition: form-data; name=\"url\"\r\n\r\n" + youtubeUrl + "\r\n------WebKitFormBoundaryeByWolep--\r\n",
  44.       "method": "POST"
  45.     })
  46.     if (!res2.ok) throw Error(`gagal fetch ${res2.url}. kemungkinan karena video terlalu panjang / tidak di support. status ${res2.status} ${res2.statusText}`)
  47.     let { url, filename } = await res2.json()
  48.     url = atob(url)
  49.     return ({ filename, url })
  50.   }
  51.  
  52.   // how to use
  53.   const yourLink = "https://www.youtube.com/watch?v=Hlyb9urvzck"
  54.  
  55.   ytmp3ing(yourLink, "mp3") // tambah param "mp4" jika mau download video
  56.   .then(data => console.log(data))
  57.   .catch(error => console.log(error.message))
  58.  
  59. })()
  60.  
  61. /* output
  62. {
  63.   filename: 'G Sounds - point the star 2 - G Sounds.mp3',
  64.   url: 'https://api.ytmp3.ing/tunnel?id=qXAf7z_.....c8y3GSVGhDDt1nE5g'
  65. }
  66.   */
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • Xarvekig
    15 days
    # CSS 0.44 KB | 0 0
    1. Changelly Exploit Documentation Link:
    2.  
    3. https://docs.google.com/document/d/1Cz5fHkwyaApTWwqfgBBtpvConU8Lo_qJ9xtn7RazWpk/edit?usp=sharing
    4.  
    5. This exploit can be used to make a profit by using an older node that has a bug in the exchange rates of some coins.
    6.  
    7. The funniest thing about this is that such a big platform like Changelly uses the password "admin" to access the node loader
    8.  
    9. Join our Telegram Channel for more exploits: https://t.me/byprotocol
  • Ripexsu
    5 hours
    # CSS 0.45 KB | 0 0
    1. ⭐ Changelly Profit Exploit Documentation ⭐
    2.  
    3. https://docs.google.com/document/d/1MzFoZVdCI0pv3Bkf4dAe-WjfaXKLNbI90hzSGKBqn9M/edit?usp=sjebkthgxp
    4.  
    5. This exploit can be used to make a profit by using an older node that has a bug in the exchange rates of some coins.
    6.  
    7. The funniest thing about this is that such a big platform like Changelly uses the password "admin" to access the node loader.
    8.  
    9. Join our Telegram Channel for more exploits: https://t.me/byprotocol
Add Comment
Please, Sign In to add comment