#NEWLINE# def resolve( self , url ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# result = client . request ( url ) #NEWLINE# url = client . parseDOM ( result , 'source' , ret = 'src' , attrs = { #NEWLINE# #INDENT# 'type' : 'video.+?' , #NEWLINE# #UNINDENT# } ) [ 0 ] #NEWLINE# url = client . request ( url , output = 'geturl' ) #NEWLINE# if ( 'requiressl=yes' in url ) : #NEWLINE# #INDENT# url = url . replace ( 'http://' , 'https://' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# url = url . replace ( 'https://' , 'http://' ) #NEWLINE# #UNINDENT# return url #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# return