#NEWLINE# def _create_flv_playlist( self , template ) : #NEWLINE# #INDENT# res = http . get ( template ) #NEWLINE# playlist = http . json ( res , schema = _vod_playlist_schema ) #NEWLINE# parsed = urlparse ( template ) #NEWLINE# url_template = '{0}://{1}{2}' . format ( parsed . scheme , parsed . netloc , playlist [ 'template' ] ) #NEWLINE# segment_max = reduce ( ( lambda i , j : ( i + j [ 0 ] ) ) , playlist [ 'fragments' ] , 0 ) #NEWLINE# substreams = [ HTTPStream ( self . session , url_template . replace ( '$fragment$' , str ( i ) ) ) for i in range ( 1 , ( segment_max + 1 ) ) ] #NEWLINE# return FLVPlaylist ( self . session , duration = playlist [ 'duration' ] , flatten_timestamps = True , skip_header = True , streams = substreams )