This commit is contained in:
j 2014-05-16 10:06:11 +02:00
commit e41942ea99
28 changed files with 240 additions and 84 deletions

View file

@ -33,7 +33,10 @@ def lookup(id):
info = {
'lccn': id
}
info['title'] = ''.join([e.text for e in mods.findall(ns + 'titleInfo')[0]])
title = mods.findall(ns + 'titleInfo')
if not title:
return {}
info['title'] = ''.join([e.text for e in title[0]])
origin = mods.findall(ns + 'originInfo')
if origin:
info['place'] = []