#NEWLINE# def get_sources( self , url , hosthdDict , hostDict , locDict ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# sources = [ ] #NEWLINE# if ( url == None ) : #NEWLINE# #INDENT# return sources #NEWLINE# #UNINDENT# url = urlparse . urljoin ( self . base_link , url ) #NEWLINE# result = client . source ( url , headers = self . headers ) #NEWLINE# url = client . parseDOM ( result , 'div' , attrs = { #NEWLINE# #INDENT# 'class' : '[^"]*movie_langs_list[^"]*' , #NEWLINE# #UNINDENT# } ) #NEWLINE# url = client . parseDOM ( url , 'a' , ret = 'href' ) #NEWLINE# url = [ i for i in url if ( 'movie_lang=en' in i ) ] [ 0 ] #NEWLINE# url = re . compile ( 'movie-player/(.*)' ) . findall ( url ) [ 0 ] #NEWLINE# url = ( self . player_link % url ) #NEWLINE# url = urlparse . urljoin ( self . base_link , url ) #NEWLINE# result = client . source ( url ) #NEWLINE# links = client . parseDOM ( result , 'ul' , { #NEWLINE# #INDENT# 'class' : 'servers' , #NEWLINE# #UNINDENT# } ) [ 0 ] #NEWLINE# links = client . parseDOM ( result , 'li' ) #NEWLINE# for link in links : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# url = client . parseDOM ( link , 'a' , ret = 'href' ) [ 0 ] #NEWLINE# url = re . compile ( 'movie-player/(.*)' ) . findall ( url ) [ 0 ] #NEWLINE# url = ( self . player_link % link ) #NEWLINE# url = urlparse . urljoin ( self . base_link , url ) #NEWLINE# url = url . encode ( 'utf-8' ) #NEWLINE# quality = client . parseDOM ( link , 'span' ) [ ( - 1 ) ] #NEWLINE# if ( 'HD' in quality ) : #NEWLINE# #INDENT# quality = 'HD' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# quality = 'SD' #NEWLINE# #UNINDENT# sources . append ( { #NEWLINE# #INDENT# 'source' : 'GVideo' , #NEWLINE# 'quality' : quality , #NEWLINE# 'provider' : 'Beinmovie' , #NEWLINE# 'url' : url , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# #UNINDENT# return sources #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# return sources