#NEWLINE# def get_episode( self , url , imdb , tvdb , title , date , season , episode ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# if ( url == None ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# query = urlparse . urljoin ( self . base_link , url ) #NEWLINE# result = client . source ( query ) #NEWLINE# result = re . compile ( 'href="(.+?)"' ) . findall ( result ) #NEWLINE# result = [ i for i in result if ( ( '/%01d-sezon/%01d-bolum' % ( int ( season ) , int ( episode ) ) ) in i ) ] [ ( - 1 ) ] #NEWLINE# try : #NEWLINE# #INDENT# url = re . compile ( '//.+?(/.+)' ) . findall ( result ) [ 0 ] #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# url = result #NEWLINE# #UNINDENT# url = client . replaceHTMLCodes ( url ) #NEWLINE# url = url . encode ( 'utf-8' ) #NEWLINE# return url #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# return