]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[bliptv] Filter out SRT files
authorz00nx 0 <z00nx0@gmail.com>
Thu, 30 Jan 2014 09:44:53 +0000 (20:44 +1100)
committerz00nx 0 <z00nx0@gmail.com>
Thu, 30 Jan 2014 09:44:53 +0000 (20:44 +1100)
youtube_dl/extractor/bliptv.py

index 3ce9b53242eb0948c0b9d5fe3b572d577e385bea..ffe6f89b11506a3ae834a02021edd7e59ad12caf 100644 (file)
@@ -78,8 +78,8 @@ class BlipTVIE(InfoExtractor):
             upload_date = datetime.datetime.strptime(data['datestamp'], '%m-%d-%y %H:%M%p').strftime('%Y%m%d')
             formats = []
             if 'additionalMedia' in data:
-                for f in sorted(data['additionalMedia'], key=lambda f: int(f['media_height'])):
-                    if not int(f['media_width']): # filter m3u8
+                for f in sorted(data['additionalMedia'], key=lambda f: int(0 if f['media_height'] is None else f['media_height'])):
+                    if not int(0 if f['media_height'] is None else f['media_height']): # filter out m3u8 and srt files
                         continue
                     formats.append({
                         'url': f['url'],