Hacker News new | ask | show | jobs
by stingraycharles 2831 days ago
In my experience, YouTube-dl needs to be updated quite frequently, as YouTube changes their design.

How is this handled here? Is periodically kill / restart the container enough?

5 comments

I don't know if it applies to the web server, but for the command-line version of youtube-dl, it has a -U option that updates itself. One could create a batch file or shell script that runs that each time, before downloading a video, or do it manually once in a while. Like someone else said, I think the creator updates the app fairly often.

Edit: I had written a post about youtube-dl describing its use a bit, and also a quick look at its code:

youtube-dl, a YouTube downloader in Python:

https://jugad2.blogspot.com/2013/03/youtube-dl-yourube-downl...

Also check out: pafy - Python API for YouTube:

https://jugad2.blogspot.com/2014/06/pafy-python-api-for-yout...

Edit 2: And this might be of use:

How to download PyCon US 2013 videos for offline viewing using youtube-dl:

https://jugad2.blogspot.com/2013/04/how-to-download-pycon-us...

It's not been my experience, but it is changed often enough that if you don't use it often, then yes it might give that impression.

https://github.com/rg3/youtube-dl/commits/master/youtube_dl/...

It looks like they're installing youtube-dl via apt, from the Ubuntu 16.04 repos (which is what the docker image uses as a base), do even rebuilding wouldn't cut it. I wonder if this will even work out of the box, because YouTube changed something that required youtube-dl to fix a month or two ago.
But it isn't actually using that in the app, it's using the https://github.com/przemyslawpluta/node-youtube-dl npm package.
That's just a wrapper calling the youtube-dl binary indirectly: https://github.com/przemyslawpluta/node-youtube-dl/blob/mast...
Well. That's a mess, I should have read more.
Which in turn relies on the original youtube-dl.
I added a travis cron job to update the image daily: https://github.com/Algram/ytdl-webserver/pull/6 and another guy came around and made the image even more friendly for automatic updates https://github.com/Algram/ytdl-webserver/pull/7

So if you ever run into issues you would just pull the latest container.

Same as how most containers update, rebuild a new version push and deploy.