Browse Source

[bliptv] Filter out SRT files

totalwebcasting
z00nx 0 11 years ago
parent
commit
4f879a5be0
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      youtube_dl/extractor/bliptv.py

+ 2
- 2
youtube_dl/extractor/bliptv.py View 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') upload_date = datetime.datetime.strptime(data['datestamp'], '%m-%d-%y %H:%M%p').strftime('%Y%m%d')
formats = [] formats = []
if 'additionalMedia' in data: 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 continue
formats.append({ formats.append({
'url': f['url'], 'url': f['url'],


Loading…
Cancel
Save