From: remitamine Date: Fri, 6 Nov 2015 06:23:03 +0000 (+0100) Subject: [cnet] skip hls_phone if hls_tablet is present X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=a641b2459263228fb1dd86dfe05d6047cedbf345;p=youtube-dl [cnet] skip hls_phone if hls_tablet is present --- 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'])