#NEWLINE# def _parse_mirrors( self ) : #NEWLINE# #INDENT# links = [ ] #NEWLINE# if ( self . page_source is not None ) : #NEWLINE# #INDENT# self . log . debug ( 'Parsing mirrors...' ) #NEWLINE# try : #NEWLINE# #INDENT# resp = json . loads ( self . page_source ) #NEWLINE# objects = resp . get ( 'response' , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) . get ( 'docs' , [ ] ) #NEWLINE# if objects : #NEWLINE# #INDENT# obj = objects [ 0 ] #NEWLINE# group = obj . get ( 'g' ) #NEWLINE# artifact = obj . get ( 'a' ) #NEWLINE# version = obj . get ( 'v' ) #NEWLINE# ext = obj . get ( 'p' ) #NEWLINE# link_template = 'http://search.maven.org/remotecontent?filepath={group}/{artifact}/{version}/{artifact}-{version}.{ext}' #NEWLINE# link = link_template . format ( group = group , artifact = artifact , version = version , ext = ext ) #NEWLINE# links . append ( link ) #NEWLINE# #UNINDENT# #UNINDENT# except BaseException as exc : #NEWLINE# #INDENT# self . log . error ( 'Error while parsing mirrors %s' , exc ) #NEWLINE# #UNINDENT# #UNINDENT# default_link = SeleniumExecutor . JUNIT_DOWNLOAD_LINK . format ( version = self . junit_version ) #NEWLINE# if ( default_link not in links ) : #NEWLINE# #INDENT# links . append ( default_link ) #NEWLINE# #UNINDENT# self . log . debug ( 'Total mirrors: %d' , len ( links ) ) #NEWLINE# return links