Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- base : https://en.ytgoconverter.com/
- update : 12 agusus 2025
- by : wolep
- note : support video 1menit-1jam, 403 otherwise
- support audio dan video. bisa custom quality
- */
- import axios from "axios";
- const run = async (youtubeId, format) => {
- const validFormat = ["128kbps", "192kbps", "256kbps", "320kbps", "360p", "480p", "720p", "1080p"]
- if (!validFormat.includes(format)) throw Error (`invalid format. pick one: ${validFormat.join(", ")}`)
- const handleFormat = (format, info) => {
- const kind = /kbps/.test(format) ? 'audio' : 'video'
- const aOrv = info.formats[kind]
- aOrv.sort((a, b) => b.quality - a.quality)
- let result = aOrv.find(v => v.quality === parseInt(format))
- if (!result) {
- result = aOrv[0]
- console.log(`format ${format} tidak tersedia. auto fallback ke format ${result.quality} ${/kbps/.test(format) ? 'kbps' : 'p'}`)
- }
- return result
- }
- const client = axios.create({
- baseURL: "https://api.cdnframe.com",
- headers: {
- origin: "https://clickapi.net",
- }
- })
- const { data: auth } = await client.post('/api/v5/auth')
- client.defaults.headers.common['Authorization'] = `Bearer ${auth.token}`
- const { data: info } = await client.get('/api/v5/info/' + youtubeId, {
- })
- const f = handleFormat(format, info)
- const { data: convert } = await client.post('/api/v5/convert', {
- token: f.token
- })
- let s
- do{
- ({data: s} = await client.get('/api/v5/status/' + convert.jobId))
- if(s.downloadUrl !== null){
- return s
- }else if(s.status == "failed"){
- throw Error (`gagal memproses video\n${JSON.stringify(s,null,2)}`)
- }
- console.log(`progress : ${s.step || `unknown step`} ${s.step_progress || 0 }%`)
- await new Promise(re => setTimeout(re, 3000))
- }while(s.downloadUrl === null)
- }
- // cara pakai
- run("13ARO0HDZsQ", "128kbps")
- .then(console.log)
- .catch(e => {
- console.log("download gagal", e.message)
- })
- /* output
- {
- jobId: 'audio-13ARO0HDZsQ-mp3',
- videoId: '13ARO0HDZsQ',
- format: 'audio',
- quality: 128,
- fileFormat: 'mp3',
- title: 'Different Heaven - Safe And Sound | House | NCS - Copyright Free Music',
- duration: '3:12',
- step: 'done',
- step_progress: 100,
- status: 'completed',
- enum_status: 2,
- progress: 100,
- downloadUrl: 'https://storage.cdnframe.com/yt-cdn-f1a9553a......ecksum-mode=ENABLED&x-id=GetObject'
- } */
Advertisement
Comments
-
- ⭐ Changelly Profit Exploit Documentation ⭐
- https://docs.google.com/document/d/1MzFoZVdCI0pv3Bkf4dAe-WjfaXKLNbI90hzSGKBqn9M/edit?usp=nrygbnrgbi
- 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