#NEWLINE# def scn_list( self , url ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# result = client . request ( url ) #NEWLINE# url = client . parseDOM ( result , 'a' , ret = 'href' , attrs = { #NEWLINE# #INDENT# 'id' : 'nav' , #NEWLINE# #UNINDENT# } ) #NEWLINE# url = [ i for i in url if ( 'page=2' in i ) ] #NEWLINE# url += re . compile ( 'href="(.+?)".+?>PREV<' ) . findall ( result ) #NEWLINE# if ( len ( url ) > 0 ) : #NEWLINE# #INDENT# url = ( ( self . scn_link + '/' ) + url [ 0 ] ) #NEWLINE# url = client . replaceHTMLCodes ( url ) #NEWLINE# result += client . request ( url ) #NEWLINE# #UNINDENT# result = result . decode ( 'iso-8859-1' ) . encode ( 'utf-8' ) #NEWLINE# result = client . parseDOM ( result , 'tr' , attrs = { #NEWLINE# #INDENT# 'class' : 'MainTable' , #NEWLINE# #UNINDENT# } ) #NEWLINE# dates = [ re . compile ( '(\\d{4}-\\d{2}-\\d{2})' ) . findall ( i ) for i in result ] #NEWLINE# dates = [ i [ 0 ] for i in dates if ( not ( len ( i ) == 0 ) ) ] #NEWLINE# dates = [ x for ( y , x ) in enumerate ( dates ) if ( x not in dates [ : y ] ) ] #NEWLINE# shows = [ client . parseDOM ( i , 'a' ) [ 0 ] for i in result ] #NEWLINE# shows = [ re . compile ( '(.*)[.](S\\d+?E\\d+?)[.]' ) . findall ( self ) for i in shows ] #NEWLINE# shows = [ ( i [ 0 ] [ 0 ] . replace ( '.' , ' ' ) , i [ 0 ] [ 1 ] ) for i in shows if ( not ( len ( i ) == 0 ) ) ] #NEWLINE# shows = [ ( ( cleantitle . tv ( i [ 0 ] ) + ' ' ) + i [ 1 ] ) for i in shows ] #NEWLINE# shows = [ i . encode ( 'utf-8' ) for i in shows ] #NEWLINE# shows = [ x for ( y , x ) in enumerate ( shows ) if ( x not in shows [ : y ] ) ] #NEWLINE# url = ( self . calendar_link % ( str ( dates [ ( - 1 ) ] ) , len ( dates ) ) ) #NEWLINE# self . list = self . trakt_list ( url ) #NEWLINE# self . list = [ i for i in self . list if ( ( '%s S%02dE%02d' % ( cleantitle . tv ( i [ 'tvshowtitle' ] ) , int ( i [ 'season' ] ) , int ( i [ 'episode' ] ) ) ) in shows ) ] #NEWLINE# return self . list #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# return