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.
Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
mabrook
Halfop
Posts: 60 Joined: Mon Jun 14, 2021 9:41 am
Post
by mabrook » Thu Aug 19, 2021 5:59 pm
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..
mabrook
Halfop
Posts: 60 Joined: Mon Jun 14, 2021 9:41 am
Post
by mabrook » Fri Aug 20, 2021 4:50 am
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 ..
CrazyCat
Revered One
Posts: 1347 Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:
Post
by CrazyCat » Fri Aug 20, 2021 5:03 am
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
mabrook
Halfop
Posts: 60 Joined: Mon Jun 14, 2021 9:41 am
Post
by mabrook » Fri Aug 20, 2021 5:15 am
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..
CrazyCat
Revered One
Posts: 1347 Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:
Post
by CrazyCat » Fri Aug 20, 2021 5:28 am
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
}
}
}
mabrook
Halfop
Posts: 60 Joined: Mon Jun 14, 2021 9:41 am
Post
by mabrook » Fri Aug 20, 2021 5:37 am
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..
Urores
Voice
Posts: 4 Joined: Mon Aug 12, 2024 7:32 pm
Post
by Urores » Tue May 20, 2025 7:24 am
Yeah, using a bot to convert YouTube links to mp3 and keep them temporarily available via public_html is a neat touch. I’ve seen similar setups before but not many that auto-delete the file after a set time like that. That part's actually useful if you’re trying to keep things cleaner or avoid storage clog. I’ve messed around with youtube-dl in personal projects, and if you combine that with a basic bash script or cron job like mentioned, it's manageable even with limited coding skills.
If you're thinking of making your own media stuff or want to edit those mp3s further, especially on Windows, you might want to
download iMovie for Windows alternatives. There's some easy editing tools out there that make it way simpler if you're not deep into technical stuff.