Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm actually curious, when you run "youtube-dl --update" where does it update from? What domain?

Trying it now results in:

  ERROR: can't find the current version. Please try again later.
I'm unclear if it had always updated itself from GitHub or elsewhere.


  $ rg 'UPDATE_URL|VERSION_URL'
  youtube_dl/update.py
  35:    UPDATE_URL = 'https://yt-dl.org/update/'
  36:    VERSION_URL = UPDATE_URL + 'LATEST_VERSION'
  37:    JSON_URL = UPDATE_URL + 'versions.json'
  46:        newversion =  opener.open(VERSION_URL).read().decode('utf-8').strip()

  $ curl -IL https://yt-dl.org/update/LATEST_VERSION
  HTTP/1.1 302 Found
  Date: Fri, 23 Oct 2020 20:15:04 GMT
  Server: Apache/2.2.15 (CentOS)
  Location: https://ytdl-org.github.io/youtube-dl/update/LATEST_VERSION
  Connection: close
  Content-Type: text/html; charset=iso-8859-1

  HTTP/2 404
  content-type: text/html; charset=utf-8
  server: GitHub.com
  etag: "5f777b31-239b"
  content-security-policy: default-src 'none'; style-src 'unsafe-inline'; img-src data:; connect-src 'self'
  x-github-request-id: 170E:2B71:1A0B5DC:1B8177E:5F933973
  accept-ranges: bytes
  date: Fri, 23 Oct 2020 20:15:04 GMT
  via: 1.1 varnish
  age: 85
  x-served-by: cache-hnd18722-HND
  x-cache: HIT
  x-cache-hits: 1
  x-timer: S1603484104.479172,VS0,VE0
  vary: Accept-Encoding
  x-fastly-request-id: a7128dab84232184052e51f07eb6263f5c88ab7e
  content-length: 9115


Thank you!

Well at least if they can hold onto their domain, and then host development somewhere, they'll maintain the ability to redirect updates to a new location without people having to manually reinstall.



Right, but the client is loading "https://yt-dl.org", which currently does a 302 to https://ytdl-org.github.io but could be updated to point elsewhere even if github is uncooperative.


What is `rg`? I like its output better than grep's.



It's one of a number of greplike tools out there. Here's a comparison chart:

https://beyondgrep.com/feature-comparison/

If you're looking for other alternative shell tools, take a look at https://altbox.dev/



ripgrep. It's a bit faster and automatically ignores files in .gitignore etc. Very handy.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: