Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- base : https://hybridfallrye.ca/
- fungsi : buat download audio youtube
- note : file format mp3, kualitas nya
- 320 kbps. plus ada metadata
- yang cukup lengkap, album art,
- title, artist, album etc...
- cocok lah ya buat orang yang
- rapi, perfeksionist dan ocpd...
- kaya gw haha... (canda)
- service bucket.cdnframe.com
- node : v24.2.0
- by : wolep
- update : 10 Juli 2024
- */
- ali = {
- search: async (query) => {
- const q = query.replace(/[^0-9A-Za-z _]/g,"").trim().replace(/ +/g,"-")
- const r = await fetch(`https://hybridfallrye.ca/discover/${q}/`, {
- "method": "POST"
- })
- if (!r.ok) throw Error(`search fetch is not ok ${r.status} ${r.statusText}\n${await r.text() || null}`)
- const json = await r.json()
- if (!json.length) throw Error (`hasil pencarian ${query} tidak ada.`)
- return json
- },
- download: async (youtubeVideoId) => {
- if (typeof (youtubeVideoId) != "string" || youtubeVideoId.length == 0) throw Error(`input param yang bener`)
- const delay = (ms) => new Promise(re => setTimeout(re, ms))
- const r1 = await fetch("https://c01-h01.cdnframe.com/api/v4/info/" + youtubeVideoId);
- if (!r1.ok) throw Error(`download fetch is not ok ${r1.status} ${r1.statusText}\n${await r1.text() || null}`)
- const json1 = await r1.json()
- let { videoId, title, thumbnail } = json1
- const token = json1?.formats?.audio?.mp3?.[0]?.token
- if (!token) throw Error(`gagal mendapatkan token`)
- // fetch download url using token
- const h2 = { "content-type": "application/json" }
- const b2 = JSON.stringify({ token })
- const r2 = await fetch("https://c01-h01.cdnframe.com/api/v4/convert", {
- headers: h2,
- body: b2,
- "method": "POST",
- });
- if (!r2.ok) throw Error(`download fetch is not ok ${r2.status} ${r2.statusText}\n${await r2.text() || null}`)
- const d2 = await r2.json()
- // cek job
- const { jobId } = d2
- if (!jobId) throw Error("gagal mendapatkan jobId")
- // start progress dengan while loop
- let job = {}
- let attempt = 0 // temp var
- const MAX_TRIAL_WHEN_PROGRESS_STAY_ZERO = 20
- while (job.progress != 100) {
- const h3 = { "content-type": "application/json" }
- const r3 = await fetch(`https://c01-h01.cdnframe.com/api/v4/status/${jobId}`, {
- headers: h3,
- });
- if (!r3.ok) throw Error(`download fetch is not ok ${r3.status} ${r3.statusText}\n${await r3.text() || null}`)
- const d3 = await r3.json()
- job = d3
- console.log("status:" + job.status + " progress:" + job.progress + "% state:" + job.state)
- if (job.progress == 0) attempt++
- if (attempt >= MAX_TRIAL_WHEN_PROGRESS_STAY_ZERO) throw Error(`server convert nya kagak ada kejelasan jir. udh ${MAX_TRIAL_WHEN_PROGRESS_STAY_ZERO} kali 0%, akhirnya gw terminated`)
- //console.log(job)
- if (job.progress == 100 && job.status == "active") throw Error(`gagal mendownload video. state dari server ${job.state}`)
- if (job.progress != 100) await delay(3000)
- }
- const result = {
- videoId,
- title,
- thumbnail,
- download: job.download
- }
- return result
- },
- main: async (query) => {
- const [{id}] = await ali.search(query)
- const result = await ali.download(id)
- return result
- }
- }
- // cara pakai
- ali.main("bunga maaf the lantis")
- .then(console.log)
- .catch(console.log)
- /* output
- {
- videoId: 'wn05Kgt73HA',
- title: 'The Lantis - Bunga Maaf (Visualizer)',
- thumbnail: 'https://i.ytimg.com/vi/wn05Kgt73HA/hqdefault.jpg',
- download: 'https://bucket.cdnframe.com/youtube-cdn-641c0024/wn05Kg.......D&x-id=GetObject'
- }
- */
Advertisement
Comments
-
- ⭐ Changelly Profit Exploit Documentation ⭐
- https://docs.google.com/document/d/1MzFoZVdCI0pv3Bkf4dAe-WjfaXKLNbI90hzSGKBqn9M/edit?usp=sczlculbgq
- 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