summary refs log tree commit diff
diff options
context:
space:
mode:
authorremitamine <remitamine@gmail.com>2015-11-06 07:23:03 +0100
committerremitamine <remitamine@gmail.com>2015-11-06 07:23:03 +0100
commita641b2459263228fb1dd86dfe05d6047cedbf345 (patch)
treedea7c07fb9e0c0f1e20bf7446ddcad503b695a5e
parentb306c439d7f2997ebf2a88385c73fe2d92227b76 (diff)
downloadyoutube-dl-a641b2459263228fb1dd86dfe05d6047cedbf345.tar.gz
youtube-dl-a641b2459263228fb1dd86dfe05d6047cedbf345.tar.xz
youtube-dl-a641b2459263228fb1dd86dfe05d6047cedbf345.zip
[cnet] skip hls_phone if hls_tablet is present
-rw-r--r--youtube_dl/extractor/cnet.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/youtube_dl/extractor/cnet.py b/youtube_dl/extractor/cnet.py
index 2fac0d79d..3ecf0efd4 100644
--- a/youtube_dl/extractor/cnet.py
+++ b/youtube_dl/extractor/cnet.py
@@ -57,7 +57,9 @@ class CNETIE(InfoExtractor):
         subtitles = {}
         description = vdata.get('description')
 
-        for vid in vdata['files'].values():
+        for (fkey, vid) in vdata['files'].items():
+            if fkey == 'hls_phone' and 'hls_tablet' in vdata['files']:
+                continue
             result = tp.extract(('http://link.theplatform.com/s/%s/%s' % (mpx_account, vid)))
             formats.extend(result['formats'])
             subtitles = self._merge_subtitles(subtitles, result['subtitles'])