denethdev-ytmp3
Version:
A simple Node.js package to download audio and video from the internet
16 lines (14 loc) • 5.04 kB
JavaScript
/*
_______ ________ __ __ ________ ________ __ __ _______ ________ __ __
| \| \ \ | \ \ \ \ | \ \| \ \ | \
| ▓▓▓▓▓▓▓\ ▓▓▓▓▓▓▓▓ ▓▓\ | ▓▓ ▓▓▓▓▓▓▓▓\▓▓▓▓▓▓▓▓ ▓▓ | ▓▓ ▓▓▓▓▓▓▓\ ▓▓▓▓▓▓▓▓ ▓▓ | ▓▓
| ▓▓ | ▓▓ ▓▓__ | ▓▓▓\| ▓▓ ▓▓__ | ▓▓ | ▓▓__| ▓▓ ▓▓ | ▓▓ ▓▓__ | ▓▓ | ▓▓
| ▓▓ | ▓▓ ▓▓ \ | ▓▓▓▓\ ▓▓ ▓▓ \ | ▓▓ | ▓▓ ▓▓ ▓▓ | ▓▓ ▓▓ \ \▓▓\ / ▓▓
| ▓▓ | ▓▓ ▓▓▓▓▓ | ▓▓\▓▓ ▓▓ ▓▓▓▓▓ | ▓▓ | ▓▓▓▓▓▓▓▓ ▓▓ | ▓▓ ▓▓▓▓▓ \▓▓\ ▓▓
| ▓▓__/ ▓▓ ▓▓_____| ▓▓ \▓▓▓▓ ▓▓_____ | ▓▓ | ▓▓ | ▓▓ ▓▓__/ ▓▓ ▓▓_____ \▓▓ ▓▓
| ▓▓ ▓▓ ▓▓ \ ▓▓ \▓▓▓ ▓▓ \ | ▓▓ | ▓▓ | ▓▓ ▓▓ ▓▓ ▓▓ \ \▓▓▓
\▓▓▓▓▓▓▓ \▓▓▓▓▓▓▓▓\▓▓ \▓▓\▓▓▓▓▓▓▓▓ \▓▓ \▓▓ \▓▓\▓▓▓▓▓▓▓ \▓▓▓▓▓▓▓▓ \▓
| ᴏᴡɴᴇʀ : ᴅᴇɴᴇᴛʜᴅᴇᴠ™
| ᴄᴏɴᴛᴀᴄᴛ : ᴅᴇɴᴇᴛʜʜᴀɴꜱᴀᴋᴀ777@ɢᴍᴀɪʟ.ᴄᴏᴍ
*/
function _0x1675(){const _0x417d59=['m4a','message','includes','flac','1080','3lMkBXN','Failed\x20to\x20fetch\x20media\x20details.','&api=dfcb6d76f2f6a9894gjkege8a4ab232222','request','success','Mozilla/5.0\x20(Windows\x20NT\x2010.0;\x20Win64;\x20x64)\x20AppleWebKit/537.36\x20(KHTML,\x20like\x20Gecko)\x20Chrome/91.0.4472.124\x20Safari/537.36','480','441SmKaiZ','359lNPcte','252424OYqzpu','7496zqQjvL','https://p.oceansaver.in/ajax/download.php?format=','&url=','3064159lvBvNp','download_url','axios','checkProgress','5310684EFHCrB','720','Error\x20in\x20fetching\x20download\x20link:\x20','360','exports','acc','webm','8849424HYJuuy','download','ogg','GET','1555370pPEynA','Format\x20not\x20supported,\x20please\x20check\x20the\x20supported\x20formats\x20list.','opus','wav','https://p.oceansaver.in/ajax/progress.php?id=','data','mp3','6FMOrYs','Error\x20checking\x20progress:\x20','99DnSKiU','6914265aMAlDa'];_0x1675=function(){return _0x417d59;};return _0x1675();}const _0x20f6f3=_0x8f2e;(function(_0x4e7826,_0x18627b){const _0x97bcde=_0x8f2e,_0x48e237=_0x4e7826();while(!![]){try{const _0x48fffd=parseInt(_0x97bcde(0x133))/0x1*(parseInt(_0x97bcde(0x135))/0x2)+-parseInt(_0x97bcde(0x12b))/0x3*(-parseInt(_0x97bcde(0x13c))/0x4)+parseInt(_0x97bcde(0x125))/0x5*(-parseInt(_0x97bcde(0x122))/0x6)+parseInt(_0x97bcde(0x138))/0x7+-parseInt(_0x97bcde(0x134))/0x8*(parseInt(_0x97bcde(0x132))/0x9)+parseInt(_0x97bcde(0x11b))/0xa*(parseInt(_0x97bcde(0x124))/0xb)+-parseInt(_0x97bcde(0x117))/0xc;if(_0x48fffd===_0x18627b)break;else _0x48e237['push'](_0x48e237['shift']());}catch(_0x4a67c5){_0x48e237['push'](_0x48e237['shift']());}}}(_0x1675,0xce253));const axios=require(_0x20f6f3(0x13a)),formatAudio=[_0x20f6f3(0x121),_0x20f6f3(0x126),_0x20f6f3(0x116),_0x20f6f3(0x115),_0x20f6f3(0x129),_0x20f6f3(0x11d),_0x20f6f3(0x119),_0x20f6f3(0x11e)],formatVideo=[_0x20f6f3(0x113),_0x20f6f3(0x131),_0x20f6f3(0x13d),_0x20f6f3(0x12a),'1440','4k'];class Ddownr{async[_0x20f6f3(0x118)](_0x1aa5bf,_0x4f26b7){const _0x2c597f=_0x20f6f3;if(!formatAudio[_0x2c597f(0x128)](_0x4f26b7)&&!formatVideo['includes'](_0x4f26b7))throw new Error(_0x2c597f(0x11c));const _0x1d6167={'method':_0x2c597f(0x11a),'url':_0x2c597f(0x136)+_0x4f26b7+_0x2c597f(0x137)+encodeURIComponent(_0x1aa5bf)+_0x2c597f(0x12d),'headers':{'User-Agent':_0x2c597f(0x130)}};try{const _0x399159=await axios['request'](_0x1d6167);if(_0x399159[_0x2c597f(0x120)]&&_0x399159[_0x2c597f(0x120)][_0x2c597f(0x12f)]){const {id:_0x4a8102,title:_0x4efb92,info:_0x2391c1}=_0x399159['data'],{image:_0xe8a43e}=_0x2391c1,_0x320d34=await this['checkProgress'](_0x4a8102);return{'id':_0x4a8102,'image':_0xe8a43e,'title':_0x4efb92,'downloadUrl':_0x320d34};}else throw new Error(_0x2c597f(0x12c));}catch(_0x273dab){throw new Error(_0x2c597f(0x112)+_0x273dab['message']);}}async[_0x20f6f3(0x13b)](_0x3cec8b){const _0xfa15f1=_0x20f6f3,_0x19c101={'method':_0xfa15f1(0x11a),'url':_0xfa15f1(0x11f)+_0x3cec8b,'headers':{'User-Agent':_0xfa15f1(0x130)}};try{while(!![]){const _0x1e910b=await axios[_0xfa15f1(0x12e)](_0x19c101);if(_0x1e910b['data']&&_0x1e910b['data']['success']&&_0x1e910b[_0xfa15f1(0x120)]['progress']===0x3e8)return _0x1e910b[_0xfa15f1(0x120)][_0xfa15f1(0x139)];await new Promise(_0x5730af=>setTimeout(_0x5730af,0x1388));}}catch(_0x98b007){throw new Error(_0xfa15f1(0x123)+_0x98b007[_0xfa15f1(0x127)]);}}}function _0x8f2e(_0x39cc32,_0x5cbd5d){const _0x1675aa=_0x1675();return _0x8f2e=function(_0x8f2e86,_0x4123d8){_0x8f2e86=_0x8f2e86-0x112;let _0x518d89=_0x1675aa[_0x8f2e86];return _0x518d89;},_0x8f2e(_0x39cc32,_0x5cbd5d);}module[_0x20f6f3(0x114)]=new Ddownr();