The Web special remote could possibly be improved by detecting when URLs reference a Youtube video page and using youtube-dl instead of wget to download the page. Youtube-dl can also handle several other video sites such as vimeo.com and blip.tv, so if this idea were to be implemented, it might make sense to borrow the regular expressions that youtube-dl uses to identify video URLs. A quick grep through the youtube-dl source for the identifier _VALID_URL should find those regexes (in Python's regex format).
This is something I've thought about doing for a while.. Two things I have not figured out:
- Seems that this should really be user-configurable or a plugin system, to handle more than just this one case.
- Youtube-dl breaks from time to time, I really trust these urls a lot less than regular urls. Perhaps per-url trust levels are called for by this.
--Joey
One way to handle the configuration might be with regular expressions. If the URL matches regex A, handle it with downloader A' (with option set A''). If the URL matches regex B, handle it with downloader B' and option set B''. And so on. Then if nothing is matched, the default downloader is wget/curl.
In my experience, youtube-dl breakages are fixed relatively quickly; a much more serious problem from a trust standpoint is that Youtube videos often disappear. Sometimes due to a legitimate copyright claim, sometimes due to illegitimate copyright claims. (I've seen both happen). Or because the video uploader decided to upload other videos that violated copyright, and Youtube closed his/her account, thereby removing all his/her videos from the Web. Youtube is definitely an untrustworthy repository as far as "the file will still be there later on" is concerned. Perhaps a default trust relationship could go along with the regexes? URLs matching regex A are semitrusted, while URLs matching regex B are untrusted.