| View previous topic :: View next topic |
| Author |
Message |
mabrook Halfop

Joined: 14 Jun 2021 Posts: 60
|
Posted: Thu Aug 19, 2021 5:59 pm Post subject: youtube to mp3 download |
|
|
hello all..
just posting the idea that i got it from other irc networks. since a lot of coders now doing YouTube script to get the info/data/etc...
how about we get the YouTube info/music/audio/video and convert to mp3 and downloaded it to specific path/dir. in specific user shell .
let's say [user shell public_html)
http://x.x.x.x/~user
example:
[user] !yt youtube-link
[bot] Converting to mp3: http://x.x.x.x/youtube-link.mp3
after awhile (60seconds or 90seconds)
[bot] Download here: http://x.x.x.x/youtube-link.mp3
i hope anyone get the idea..  |
|
| Back to top |
|
 |
CrazyCat Revered One

Joined: 13 Jan 2002 Posts: 1032 Location: France
|
|
| Back to top |
|
 |
mabrook Halfop

Joined: 14 Jun 2021 Posts: 60
|
Posted: Fri Aug 20, 2021 4:50 am Post subject: |
|
|
| Code: | | Not a new idea. Have a look to http://forum.egghelp.org/viewtopic.php?t=19601 or search for "youtube-dl" in the forum |
although the idea is there.. but it is different way ..
while from here is a different way also,, let's say [user shell public_html)
http://x.x.x.x/~user
Example:
[user] !yt youtube-link
[bot] Converting to mp3: youtube-link.mp3 , please wait... (youtube link converting )
after awhile (60seconds or 90seconds)
[bot] Download here: http://x.x.x.x/youtube-link.mp3 <-- see this one, it will appear in the channel, and this link is clickable to download
i hope you see a difference ..
 |
|
| Back to top |
|
 |
CrazyCat Revered One

Joined: 13 Jan 2002 Posts: 1032 Location: France
|
Posted: Fri Aug 20, 2021 5:03 am Post subject: |
|
|
I don't see any difference, appart that the message is different and you want to put the mp3 file on a public webspace.
I'll see if I can find 15' to do a little script _________________ https://www.eggdrop.fr - French IRC network
Offer me a coffee - Do not ask me help in PM, we are a community. |
|
| Back to top |
|
 |
mabrook Halfop

Joined: 14 Jun 2021 Posts: 60
|
Posted: Fri Aug 20, 2021 5:15 am Post subject: |
|
|
sorry i forgot to mention..
once the file will be downloaded and be put in here;
http://x.x.x.x/youtube-link.mp3
there's a limited time only from this file to be stored in public..
let's say , after 1hour or 2hours it will be deleted automatically..
*** The purpose is to convert the youtube-link to mp3 and store the file in public_html of the user and it will be deleted after specific time.
That's it.. |
|
| Back to top |
|
 |
CrazyCat Revered One

Joined: 13 Jan 2002 Posts: 1032 Location: France
|
Posted: Fri Aug 20, 2021 5:28 am Post subject: |
|
|
deleting a file after a delay is quite simple.
You can do it using bash:
| Code: | | find /your/public/path/ -iname '*.mp3' -mmin 120 -exec rm -f {} \; |
You can also do it with a tcl script:
| Code: | set mp3path "/your/public/path/"
bind cron - "* * * * *" delmp3
proc delmp3 {min hour day month dow} {
set tmpfiles [glob -directory $::mp3path *.mp3]
foreach mp3 $tmpfiles {
if {[file mtime $mp3]<[expr {[clock seconds] - (120*60)}]} {
file delete -force $mp3
}
}
} |
_________________ https://www.eggdrop.fr - French IRC network
Offer me a coffee - Do not ask me help in PM, we are a community. |
|
| Back to top |
|
 |
mabrook Halfop

Joined: 14 Jun 2021 Posts: 60
|
Posted: Fri Aug 20, 2021 5:37 am Post subject: |
|
|
that's a good one... i hope i know how to do it..
can you make a simple script for that with
youtube to mp3 and the integrate the specific time to delete the file..
i really don't have any idea or know how to begin with..
 |
|
| Back to top |
|
 |
|