[cnet] skip hls_phone if hls_tablet is present
authorremitamine <remitamine@gmail.com>
Fri, 6 Nov 2015 06:23:03 +0000 (07:23 +0100)
committerremitamine <remitamine@gmail.com>
Fri, 6 Nov 2015 06:23:03 +0000 (07:23 +0100)
youtube_dl/extractor/cnet.py

index 2fac0d79d3cbd4a3aafba52c185aa9e0c31bbc03..3ecf0efd4f9a09fedf5a31abc6eef07e3170b552 100644 (file)
@@ -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'])