diff options
| author | Remita Amine <remitamine@gmail.com> | 2017-04-01 15:35:39 +0100 | 
|---|---|---|
| committer | Remita Amine <remitamine@gmail.com> | 2017-04-01 15:35:39 +0100 | 
| commit | a6f3a162f35cc05ac5a34773b438dd4c5f0d164a (patch) | |
| tree | 7b60ce1520cd972a5c504facdbc9829470b8f189 /youtube_dl/extractor/limelight.py | |
| parent | 91399b2fcc95e72f052ee9eab8e12b68d1815c9e (diff) | |
[limelight] improve extraction for audio only formats
Diffstat (limited to 'youtube_dl/extractor/limelight.py')
| -rw-r--r-- | youtube_dl/extractor/limelight.py | 16 | 
1 files changed, 12 insertions, 4 deletions
diff --git a/youtube_dl/extractor/limelight.py b/youtube_dl/extractor/limelight.py index 422be2528..f52c2e169 100644 --- a/youtube_dl/extractor/limelight.py +++ b/youtube_dl/extractor/limelight.py @@ -62,13 +62,21 @@ class LimelightBaseIE(InfoExtractor):                  fmt = {                      'url': stream_url,                      'abr': float_or_none(stream.get('audioBitRate')), -                    'vbr': float_or_none(stream.get('videoBitRate')),                      'fps': float_or_none(stream.get('videoFrameRate')), -                    'width': int_or_none(stream.get('videoWidthInPixels')), -                    'height': int_or_none(stream.get('videoHeightInPixels')),                      'ext': ext,                  } -                rtmp = re.search(r'^(?P<url>rtmpe?://(?P<host>[^/]+)/(?P<app>.+))/(?P<playpath>mp4:.+)$', stream_url) +                width = int_or_none(stream.get('videoWidthInPixels')) +                height = int_or_none(stream.get('videoHeightInPixels')) +                vbr = float_or_none(stream.get('videoBitRate')) +                if width or height or vbr: +                    fmt.update({ +                        'width': width, +                        'height': height, +                        'vbr': vbr, +                    }) +                else: +                    fmt['vcodec'] = 'none' +                rtmp = re.search(r'^(?P<url>rtmpe?://(?P<host>[^/]+)/(?P<app>.+))/(?P<playpath>mp[34]:.+)$', stream_url)                  if rtmp:                      format_id = 'rtmp'                      if stream.get('videoBitRate'):  | 
