UNPKG

denethdev-ytmp3

Version:

A simple Node.js package to download audio and video from the internet

16 lines (14 loc) 3.73 kB
/* _______ ________ __ __ ________ ________ __ __ _______ ________ __ __ | \| \ \ | \ \ \ \ | \ \| \ \ | \ | ▓▓▓▓▓▓▓\ ▓▓▓▓▓▓▓▓ ▓▓\ | ▓▓ ▓▓▓▓▓▓▓▓\▓▓▓▓▓▓▓▓ ▓▓ | ▓▓ ▓▓▓▓▓▓▓\ ▓▓▓▓▓▓▓▓ ▓▓ | ▓▓ | ▓▓ | ▓▓ ▓▓__ | ▓▓▓\| ▓▓ ▓▓__ | ▓▓ | ▓▓__| ▓▓ ▓▓ | ▓▓ ▓▓__ | ▓▓ | ▓▓ | ▓▓ | ▓▓ ▓▓ \ | ▓▓▓▓\ ▓▓ ▓▓ \ | ▓▓ | ▓▓ ▓▓ ▓▓ | ▓▓ ▓▓ \ \▓▓\ / ▓▓ | ▓▓ | ▓▓ ▓▓▓▓▓ | ▓▓\▓▓ ▓▓ ▓▓▓▓▓ | ▓▓ | ▓▓▓▓▓▓▓▓ ▓▓ | ▓▓ ▓▓▓▓▓ \▓▓\ ▓▓ | ▓▓__/ ▓▓ ▓▓_____| ▓▓ \▓▓▓▓ ▓▓_____ | ▓▓ | ▓▓ | ▓▓ ▓▓__/ ▓▓ ▓▓_____ \▓▓ ▓▓ | ▓▓ ▓▓ ▓▓ \ ▓▓ \▓▓▓ ▓▓ \ | ▓▓ | ▓▓ | ▓▓ ▓▓ ▓▓ ▓▓ \ \▓▓▓ \▓▓▓▓▓▓▓ \▓▓▓▓▓▓▓▓\▓▓ \▓▓\▓▓▓▓▓▓▓▓ \▓▓ \▓▓ \▓▓\▓▓▓▓▓▓▓ \▓▓▓▓▓▓▓▓ \▓ | ᴏᴡɴᴇʀ : ᴅᴇɴᴇᴛʜᴅᴇᴠ™ | ᴄᴏɴᴛᴀᴄᴛ : ᴅᴇɴᴇᴛʜʜᴀɴꜱᴀᴋᴀ777@ɢᴍᴀɪʟ.ᴄᴏᴍ */ function _0x1f21(){const _0x5df589=['7241604omKBgq','query','status','26HPGmiP','3885429YqFUgd','message','Server\x20running\x20at\x20http://localhost:','20TjFPkh','./ddownr','/download','14757jonJkE','1043312VdnsZr','URL\x20and\x20format\x20are\x20required.','download','1264436LRZpLS','json','934695uJYTNU','7EgiOta','image','log','title','6288170GZjeRb','downloadUrl','get','send'];_0x1f21=function(){return _0x5df589;};return _0x1f21();}const _0x334ddd=_0x4bc2;function _0x4bc2(_0x273a2d,_0x2bb236){const _0x1f21c3=_0x1f21();return _0x4bc2=function(_0x4bc24a,_0x5da099){_0x4bc24a=_0x4bc24a-0xa9;let _0x12bfc6=_0x1f21c3[_0x4bc24a];return _0x12bfc6;},_0x4bc2(_0x273a2d,_0x2bb236);}(function(_0x1e0519,_0x4980c9){const _0x5942b0=_0x4bc2,_0x2cf488=_0x1e0519();while(!![]){try{const _0x5b0bea=-parseInt(_0x5942b0(0xad))/0x1*(parseInt(_0x5942b0(0xbf))/0x2)+parseInt(_0x5942b0(0xc0))/0x3+-parseInt(_0x5942b0(0xb1))/0x4*(-parseInt(_0x5942b0(0xaa))/0x5)+-parseInt(_0x5942b0(0xbc))/0x6*(parseInt(_0x5942b0(0xb4))/0x7)+parseInt(_0x5942b0(0xae))/0x8+parseInt(_0x5942b0(0xb3))/0x9+-parseInt(_0x5942b0(0xb8))/0xa;if(_0x5b0bea===_0x4980c9)break;else _0x2cf488['push'](_0x2cf488['shift']());}catch(_0x44158f){_0x2cf488['push'](_0x2cf488['shift']());}}}(_0x1f21,0xbb130));const express=require('express'),ddownr=require(_0x334ddd(0xab)),app=express(),port=0xbb8;app[_0x334ddd(0xba)](_0x334ddd(0xac),async(_0x4877bd,_0x3ef614)=>{const _0x5a14bf=_0x334ddd,{url:_0xf58749,format:_0x4d8135}=_0x4877bd[_0x5a14bf(0xbd)];if(!_0xf58749||!_0x4d8135)return _0x3ef614[_0x5a14bf(0xbe)](0x190)[_0x5a14bf(0xbb)]({'error':_0x5a14bf(0xaf)});try{const _0x127f6c=await ddownr[_0x5a14bf(0xb0)](_0xf58749,_0x4d8135);_0x3ef614[_0x5a14bf(0xb2)]({'success':!![],'title':_0x127f6c[_0x5a14bf(0xb7)],'downloadUrl':_0x127f6c[_0x5a14bf(0xb9)],'image':_0x127f6c[_0x5a14bf(0xb5)]});}catch(_0x72f5c5){_0x3ef614[_0x5a14bf(0xbe)](0x1f4)['send']({'error':_0x72f5c5[_0x5a14bf(0xc1)]});}}),app['listen'](port,()=>{const _0x25b645=_0x334ddd;console[_0x25b645(0xb6)](_0x25b645(0xa9)+port);});