X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=README.md;h=b4069515e130cb250234b519d56ce128f848564c;hb=ccdd34ed784ec3f8c84d768b5cdd818b539bbf56;hp=c1d390a561d92ae46d6a709cd2310fca5ec671ad;hpb=5fbd672c386e932ef6cbccad5e09b47ff69b5f74;p=youtube-dl.git diff --git a/README.md b/README.md index c1d390a56..b4069515e 100644 --- a/README.md +++ b/README.md @@ -250,6 +250,7 @@ which means you can modify it, redistribute it or use it however you like. default --embed-subs embed subtitles in the video (only for mp4 videos) + --embed-thumbnail embed thumbnail in the audio as cover art --add-metadata write metadata to the video file --xattrs write metadata to the video file's xattrs (using dublin core and xdg standards) @@ -384,12 +385,13 @@ If you want to add support for a new site, you can follow this quick list (assum import re from .common import InfoExtractor - - + + class YourExtractorIE(InfoExtractor): - _VALID_URL = r'https?://(?:www\.)yourextractor\.com/watch/(?P[0-9]+)' + _VALID_URL = r'https?://(?:www\.)?yourextractor\.com/watch/(?P[0-9]+)' _TEST = { 'url': 'http://yourextractor.com/watch/42', + 'md5': 'TODO: md5 sum of the first 10KiB of the video file', 'info_dict': { 'id': '42', 'ext': 'mp4', @@ -416,6 +418,7 @@ If you want to add support for a new site, you can follow this quick list (assum # TODO more properties (see youtube_dl/extractor/common.py) } + 5. Add an import in [`youtube_dl/extractor/__init__.py`](https://github.com/rg3/youtube-dl/blob/master/youtube_dl/extractor/__init__.py). 6. Run `python test/test_download.py TestDownload.test_YourExtractor`. This *should fail* at first, but you can continually re-run it until you're done. 7. Have a look at [`youtube_dl/common/extractor/common.py`](https://github.com/rg3/youtube-dl/blob/master/youtube_dl/extractor/common.py) for possible helper methods and a [detailed description of what your extractor should return](https://github.com/rg3/youtube-dl/blob/master/youtube_dl/extractor/common.py#L38). Add tests and code for as many as you want.