aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/facebook.py
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2016-02-24 03:43:24 +0800
committerYen Chi Hsuan <yan12125@gmail.com>2016-02-24 03:43:24 +0800
commitc24883a1c0e650a41b54e7cdec8427b046c27bc1 (patch)
treec8757c7c19e166f02609e787d10032aa9245921b /youtube_dl/extractor/facebook.py
parent1b77ee6248b2a9967d3d3e809e416bd26fd7342c (diff)
[facebook] Fix format sorting
'hd' formats should have higher priorities
Diffstat (limited to 'youtube_dl/extractor/facebook.py')
-rw-r--r--youtube_dl/extractor/facebook.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/youtube_dl/extractor/facebook.py b/youtube_dl/extractor/facebook.py
index d2ff38140..6c6c3b1bd 100644
--- a/youtube_dl/extractor/facebook.py
+++ b/youtube_dl/extractor/facebook.py
@@ -212,10 +212,13 @@ class FacebookIE(InfoExtractor):
for src_type in ('src', 'src_no_ratelimit'):
src = f[0].get('%s_%s' % (quality, src_type))
if src:
+ preference = -10 if format_id == 'progressive' else 0
+ if quality == 'hd':
+ preference += 5
formats.append({
'format_id': '%s_%s_%s' % (format_id, quality, src_type),
'url': src,
- 'preference': -10 if format_id == 'progressive' else 0,
+ 'preference': preference,
})
dash_manifest = f[0].get('dash_manifest')
if dash_manifest: