aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/common.py
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2017-02-25 18:40:05 +0800
committerYen Chi Hsuan <yan12125@gmail.com>2017-02-25 18:40:05 +0800
commiteeb0a9568442a4dbbf3478579abe2696fbe890e2 (patch)
tree182ec7f44bc9d4fded062a88195d8ce70cd1e59f /youtube_dl/extractor/common.py
parent231bcd0b6b7737e6b0484ce8aaa4a14de442a1ae (diff)
[extractor/common] Add 'preference' to _parse_html5_media_entries
Some websites, like NJPWorld, put different qualities on different player pages.
Diffstat (limited to 'youtube_dl/extractor/common.py')
-rw-r--r--youtube_dl/extractor/common.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py
index 4252d6825..eb3c091aa 100644
--- a/youtube_dl/extractor/common.py
+++ b/youtube_dl/extractor/common.py
@@ -2010,7 +2010,7 @@ class InfoExtractor(object):
})
return formats
- def _parse_html5_media_entries(self, base_url, webpage, video_id, m3u8_id=None, m3u8_entry_protocol='m3u8', mpd_id=None):
+ def _parse_html5_media_entries(self, base_url, webpage, video_id, m3u8_id=None, m3u8_entry_protocol='m3u8', mpd_id=None, preference=None):
def absolute_url(video_url):
return compat_urlparse.urljoin(base_url, video_url)
@@ -2032,7 +2032,8 @@ class InfoExtractor(object):
is_plain_url = False
formats = self._extract_m3u8_formats(
full_url, video_id, ext='mp4',
- entry_protocol=m3u8_entry_protocol, m3u8_id=m3u8_id)
+ entry_protocol=m3u8_entry_protocol, m3u8_id=m3u8_id,
+ preference=preference)
elif ext == 'mpd':
is_plain_url = False
formats = self._extract_mpd_formats(