0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-19 01:45:13 +00:00

[bliptv] Filter out SRT files

This commit is contained in:
z00nx 0 2014-01-30 20:44:53 +11:00
parent 1a0648b4a9
commit 4f879a5be0

View file

@ -78,8 +78,8 @@ def _real_extract(self, url):
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'],