#NEWLINE# def _extract_metrics_and_provenance_url( self , entries , status_code = 200 , id = None ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# max_citation = 0 #NEWLINE# for entry in citation : #NEWLINE# #INDENT# citation = int ( entry [ 'citedby-count' ] ) #NEWLINE# if ( citation > max_citation ) : #NEWLINE# #INDENT# max_citation = citation #NEWLINE# api_url = entry [ 'prism:url' ] #NEWLINE# provenance_url = api_url #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# except ( KeyError , TypeError , ValueError ) : #NEWLINE# #INDENT# return { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# if max_citation : #NEWLINE# #INDENT# metrics_dict = { #NEWLINE# #INDENT# 'scopus:citations' : ( max_citation , provenance_url ) , #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# metrics_dict = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# return metrics_dict