#NEWLINE# def find_stream( self , options , resource ) : #NEWLINE# #INDENT# tempresource = resource [ 'Data' ] [ 0 ] [ 'Assets' ] #NEWLINE# for resources in tempresource : #NEWLINE# #INDENT# if ( resources [ 'Kind' ] == 'VideoResource' ) : #NEWLINE# #INDENT# links = resources [ 'Links' ] #NEWLINE# break #NEWLINE# #UNINDENT# #UNINDENT# for i in links : #NEWLINE# #INDENT# if ( ( i [ 'Target' ] == 'Ios' ) or ( i [ 'Target' ] == 'HLS' ) ) : #NEWLINE# #INDENT# streams = hlsparse ( options , self . http . request ( 'get' , i [ 'Uri' ] ) , i [ 'Uri' ] ) #NEWLINE# for n in list ( streams . keys ( ) ) : #NEWLINE# #INDENT# ( yield streams [ n ] ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( i [ 'Target' ] == 'Streaming' ) : #NEWLINE# #INDENT# options . other = ( "-y '%s'" % i [ 'Uri' ] . replace ( 'rtmp://vod.dr.dk/cms/' , '' ) ) #NEWLINE# rtmp = 'rtmp://vod.dr.dk/cms/' #NEWLINE# ( yield RTMP ( copy . copy ( options ) , rtmp , i [ 'Bitrate' ] ) )