#NEWLINE# def _extract_biblio_elink( self , page , id = None ) : #NEWLINE# #INDENT# biblio_dict = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# if ( not page ) : #NEWLINE# #INDENT# return biblio_dict #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# tree = etree . parse ( StringIO ( page ) ) #NEWLINE# obj_urls = tree . xpath ( "//ObjUrl[Category='Full Text Sources' and Attribute='free resource']/Url" ) #NEWLINE# if obj_urls : #NEWLINE# #INDENT# biblio_dict = { #NEWLINE# #INDENT# 'free_fulltext_url' : obj_urls [ 0 ] . text , #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# #UNINDENT# except etree . XMLSyntaxError : #NEWLINE# #INDENT# self . logger . warning ( '{provider_name} _extract_biblio_elink XMLSyntaxError on {id}' . format ( provider_name = biblio_dict . provider_name , id = id ) ) #NEWLINE# #UNINDENT# return biblio_dict