[test_InfoExtractor] Add m3u8 parsing test for NAME attribute in EXT-X-STREAM-INF tag

This commit is contained in:
Sergey M․ 2017-04-23 11:49:57 +07:00
parent 07ad0cf34f
commit ddd258f922
No known key found for this signature in database
GPG key ID: 2C393E0F18A9236D
2 changed files with 56 additions and 11 deletions

View file

@ -1397,7 +1397,9 @@ class InfoExtractor(object):
def build_stream_name():
# Despite specification does not mention NAME attribute for
# EXT-X-STREAM-INF it still sometimes may be present
# EXT-X-STREAM-INF tag (see [1] or vidio test in
# test_parse_m3u8_formats) it still sometimes may be present
# 1. http://www.vidio.com/watch/165683-dj_ambred-booyah-live-2015
stream_name = last_stream_inf.get('NAME')
if stream_name:
return stream_name