Is there a way to download YouTube videos through an IRC channel? reddit / irc ---------------------------------------------------------------------- spitfire_x84 · 2019-02-06 14:30 Something like youtube-dl where I send an URL and I receive the video in a file. ---------------------------------------------------------------------- [deleted] · 2019-02-06 14:33 [deleted] ---------------------------------------------------------------------- spitfire_x84 · 2019-02-06 14:35 If I wanted to program a bot to do that where could I start? ---------------------------------------------------------------------- ElectronicMotion · 2019-02-06 15:09 It depends on what you know about programming :) But please be aware of that IRC can't transfer files on its own.You will need to open up some other communication. (p2p or download from website or so) ​ EDIT: Appended some info. ---------------------------------------------------------------------- spitfire_x84 · 2019-02-06 15:18 Thanks, from what I've seen on Google maybe the best option to me would be to write it in PHP. I would contact the bot from a closed connection, it would download the file on an open connection and send it to me. ---------------------------------------------------------------------- ElectronicMotion · 2019-02-06 15:23 I honestly dont know how a IRC Bot in PHP would work, I only can say that Python did work for me like a charm in the past. :) ​ Maybe you can send your self a link where you stored the downloaded video? I know that there are some IRC clients with a DCC feature. I think mIRC could do that. ---------------------------------------------------------------------- spitfire_x84 · 2019-02-06 15:24 Yes, maybe it's better to send the link than to send the file itself. Thanks ---------------------------------------------------------------------- ElectronicMotion · 2019-02-06 15:25 Sure, u are welcome! :) I think the most complicated thing should be the download (and conversion, if needed). But maybe there are librarys for php which have functions for that. Idk. ​ ---------------------------------------------------------------------- [deleted] · 2019-02-06 15:39 [deleted] ---------------------------------------------------------------------- JeHugawa · 2019-02-06 16:38 Trust me you don't want to use php trust me. as most said python is way to go but most important is that you dont use php. ---------------------------------------------------------------------- spitfire_x84 · 2019-02-06 16:43 LOL ok, I wont' use PHP. ---------------------------------------------------------------------- ElectronicMotion · 2019-02-07 08:24 Python also has some neat librarys that can do most of the work. :) ​ ---------------------------------------------------------------------- pedz · 2019-02-07 12:42 I personally would use [eggdrop](https://www.eggheads.org/) and a TCL script. The bot is already done and you just need to load a script to complement it. I'm very bad with TCL but I've made a few scripts calling bash scripts to get the title of the URLs pasted into my chan. You can use a keyword trigger so that it doesn't do every video posted on your chan. Like prefixing your URL with youtube-dl or something like that. ---------------------------------------------------------------------- spitfire_x84 · 2019-02-07 13:15 I'm already working with Python but I'll surely take a look. ---------------------------------------------------------------------- uneducatedcontrarian · 2019-03-03 21:52 In my opinion the simplest route here would be using Perl's POE::Component::IRC module and streamlink. You'd use regex to grab the trigger (!youtube, etc.) from the channel's buffer then download the file using streamlink and initiate a dcc transfer to the user who requested it. Unlike youtube-dl, streamlink lets you select quality so could add another arg for that as well.