This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

youtube to mp3 download

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
User avatar
mabrook
Halfop
Posts: 60
Joined: Mon Jun 14, 2021 9:41 am

youtube to mp3 download

Post by mabrook »

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.. :P :P :P :P
User avatar
CrazyCat
Revered One
Posts: 1293
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

Not a new idea. Have a look to http://forum.egghelp.org/viewtopic.php?t=19601 or search for "youtube-dl" in the forum
User avatar
mabrook
Halfop
Posts: 60
Joined: Mon Jun 14, 2021 9:41 am

Post by mabrook »

Code: Select all

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 ..


:P :P :P :P :P :P :P :P
User avatar
CrazyCat
Revered One
Posts: 1293
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

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
User avatar
mabrook
Halfop
Posts: 60
Joined: Mon Jun 14, 2021 9:41 am

Post by mabrook »

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..
User avatar
CrazyCat
Revered One
Posts: 1293
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

deleting a file after a delay is quite simple.
You can do it using bash:

Code: Select all

find /your/public/path/ -iname '*.mp3' -mmin 120 -exec rm -f {} \;
You can also do it with a tcl script:

Code: Select all

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
      }
   }
}
User avatar
mabrook
Halfop
Posts: 60
Joined: Mon Jun 14, 2021 9:41 am

Post by mabrook »

that's a good one... i hope i know how to do it.. :P



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..

:P :P :P :P
Post Reply