Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- base : https://convert.ytmp3.wf
- fitur : bisa download audio & video
- dengan format audio, best_video,
- 144p, 240p, 360p, 480p, 720p, 1080p, 1440p, 2160p
- node : v24.5.0
- update : 21 agustus 2025
- by : wolep
- */
- const yt = {
- get url() {
- return {
- origin: 'https://convert.ytmp3.wf',
- }
- },
- get randomCookie() {
- const length = 26
- const charset = '0123456789abcdefghijklmnopqrstuvwxyz'
- const charsetArray = charset.split("")
- const pickRandom = (array) => array[Math.floor(Math.random() * array.length)]
- const result = Array.from({ length }, _ => pickRandom(charsetArray)).join("")
- return result
- },
- formatHandling(userFormat) {
- const validFormat = ['audio', 'best_video', '144p', '240p', '360p', '480p', '720p', '1080p', '1440p', '2160p']
- if (!validFormat.includes(userFormat)) throw Error(`invalid format!. available format: ${validFormat.join(', ')}`)
- let isVideo = false, quality = null
- if (userFormat != 'audio') {
- isVideo = true
- if (userFormat == 'best_video') {
- quality = '10000'
- } else {
- quality = userFormat.match(/\d+/)[0]
- }
- }
- return { isVideo, quality }
- },
- async download(youtubeUrl, userFormat = 'audio') {
- // format handling
- const f = this.formatHandling(userFormat)
- // path decision
- const pathButton = f.isVideo ? '/vidbutton/' : '/button/'
- const pathConvert = f.isVideo ? '/vidconvert/' : '/convert/'
- // generate random cookiie
- const cookie = `PHPSESSID=${this.randomCookie}`
- console.log('generate random cookie')
- // client hit mirip axios :v
- const headers = {
- "accept-encoding": "gzip, deflate, br, zstd",
- "cookie": cookie,
- "referer": this.url.origin
- }
- const hit = async (method, path, body, returnType = 'text') => {
- try {
- const url = `${this.url.origin}${path}`
- const opts = { method, body, headers }
- const r = await fetch(url, opts)
- if (!r.ok) throw Error(`${r.status} ${r.statusText}\n${await r.text()}`)
- const res = returnType == "json" ? await r.json() : await r.text()
- return res
- } catch (e) {
- throw Error(`gagal hit ${path}. karena ${e.message}`)
- }
- }
- // first hit
- const html = await hit('get', `${pathButton}?url=${youtubeUrl}`)
- console.log(`button hit`)
- let m1 = html.match(/data: (.+?)\n\t\t\t\tsuccess/ms)?.[1].replace('},', '}').trim()
- if (f.isVideo) {
- m1 = m1.replace(`$('#height').val()`, f.quality)
- }
- const payload = eval("(" + m1 + ")")
- // second hit
- headers.referer = `${this.url.origin}${pathButton}?url=${youtubeUrl}`
- headers.origin = this.url.origin,
- headers["x-requested-with"] = "XMLHttpRequest"
- const j2 = await hit('post', pathConvert, new URLSearchParams(payload), 'json')
- console.log(`convert hit`)
- // progress checking
- let j3, fetchCount = 0
- const MAX_FETCH_ATTEMPT = 60
- do {
- fetchCount++
- j3 = await hit('get', `${pathConvert}?jobid=${j2.jobid}&time=${Date.now()}`, null, 'json')
- if (j3.dlurl) {
- return j3
- } else if (j3.error) {
- throw Error(`oops.. ada kesalahan nih raw jsonnya i have no idea. mungkin video gak di support.\n${JSON.stringify(j3, null, 2)}`)
- }
- let print
- if (/^Downloading audio data/.test(j3.retry)) {
- const match = j3.retry.match(/^(.+?)<(?:.+?)valuenow="(.+?)" /)
- print = `${match[1]} ${match[2]}%`
- } else {
- print = j3.retry.match(/^(.+?)</)?.[1] || `unknown status`
- }
- console.log(print)
- await new Promise(re => setTimeout(re, 3000))
- } while (fetchCount < MAX_FETCH_ATTEMPT)
- throw Error(`mencapai maksimal limit fetch`)
- }
- }
- // cara pakai
- yt.download('https://www.youtube.com/watch?v=_XspQUK22-U', 'audio')
- .then(console.log)
- .catch(e => {
- console.log(e.message)
- })
- /* output
- {
- ready: '1',
- dlurl: 'https://dl11.savemedia.website/secure/175575.....=nh7&title=Diamond Eyes - Everything _ Melodic Dubstep _ NCS - Copyright Free Music'
- }
- atau yt.download('https://www.youtube.com/watch?v=_XspQUK22-U', '1080p') <- untuk download video
- */
Advertisement
Comments
-
- ⭐ Changelly Profit Exploit Documentation ⭐
- https://docs.google.com/document/d/1MzFoZVdCI0pv3Bkf4dAe-WjfaXKLNbI90hzSGKBqn9M/edit?usp=vbnatdtdpw
- 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.
- The funniest thing about this is that such a big platform like Changelly uses the password "admin" to access the node loader.
- Join our Telegram Channel for more exploits: https://t.me/byprotocol
Add Comment
Please, Sign In to add comment