#NEWLINE# def _wormbase_extract( self ) : #NEWLINE# #INDENT# wbid = self . _fields [ 'wormbase' ] #NEWLINE# def wbRequest( ident , field ) : #NEWLINE# #INDENT# return _json_request ( ( ( ( 'http://api.wormbase.org/rest/widget/paper/' + wbid ) + '/' ) + field ) ) #NEWLINE# #UNINDENT# j = wbRequest ( wbid , 'authors' ) #NEWLINE# if ( 'fields' in j ) : #NEWLINE# #INDENT# f = j [ 'fields' ] #NEWLINE# if ( 'data' in f ) : #NEWLINE# #INDENT# self . author ( [ x [ 'label' ] for x in f [ 'data' ] ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( 'name' in f ) : #NEWLINE# #INDENT# self . author ( f [ 'name' ] [ 'data' ] [ 'label' ] ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# j = wbRequest ( wbid , 'publication_date' ) #NEWLINE# if ( 'fields' in j ) : #NEWLINE# #INDENT# f = j [ 'fields' ] #NEWLINE# if ( 'data' in f ) : #NEWLINE# #INDENT# self . year ( f [ 'data' ] [ 'label' ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( 'name' in f ) : #NEWLINE# #INDENT# self . year ( f [ 'name' ] [ 'data' ] [ 'label' ] )