## Video Format Options:
-f, --format FORMAT video format code, specify the order of
- preference using slashes: "-f 22/17/18".
- "-f mp4" and "-f flv" are also supported.
- You can also use the special names "best",
- "bestvideo", "bestaudio", "worst",
- "worstvideo" and "worstaudio". By default,
- youtube-dl will pick the best quality.
+ preference using slashes: -f 22/17/18 . -f
+ mp4 , -f m4a and -f flv are also
+ supported. You can also use the special
+ names "best", "bestvideo", "bestaudio",
+ "worst", "worstvideo" and "worstaudio". By
+ default, youtube-dl will pick the best
+ quality. Use commas to download multiple
+ audio formats, such as -f
+ 136/137/mp4/bestvideo,140/m4a/bestaudio
--all-formats download all available video formats
--prefer-free-formats prefer free video formats unless a specific
one is requested
# coding: utf-8
from __future__ import unicode_literals
- import re
-
from .common import InfoExtractor
_VALID_URL = r'https?://(?:www\.)?yourextractor\.com/watch/(?P<id>[0-9]+)'
_TEST = {
'url': 'http://yourextractor.com/watch/42',
- 'md5': 'TODO: md5 sum of the first 10KiB of the video file',
+ 'md5': 'TODO: md5 sum of the first 10241 bytes of the video file (use --test)',
'info_dict': {
'id': '42',
'ext': 'mp4',
}
def _real_extract(self, url):
- mobj = re.match(self._VALID_URL, url)
- video_id = mobj.group('id')
+ video_id = self._match_id(url)
# TODO more code goes here, for example ...
webpage = self._download_webpage(url, video_id)