mirror of
https://github.com/qurator-spk/modstool.git
synced 2025-06-10 04:09:56 +02:00
🐛 mods4pandas: Handle periodical without structMap TYPE='PHYSICAL'
This commit is contained in:
parent
6226618f40
commit
b8a2872582
1 changed files with 5 additions and 2 deletions
|
@ -270,8 +270,11 @@ def pages_to_dict(mets, raise_errors=True) -> List[Dict]:
|
||||||
structMap_LOGICAL = mets.find('./mets:structMap[@TYPE="LOGICAL"]', ns)
|
structMap_LOGICAL = mets.find('./mets:structMap[@TYPE="LOGICAL"]', ns)
|
||||||
fileSec = mets.find('./mets:fileSec', ns)
|
fileSec = mets.find('./mets:fileSec', ns)
|
||||||
if structMap_PHYSICAL is None:
|
if structMap_PHYSICAL is None:
|
||||||
# This is expected in a multivolume work!
|
# This is expected in a multivolume work or periodical!
|
||||||
if structMap_LOGICAL.find('./mets:div[@TYPE="multivolume_work"]', ns) is not None:
|
if any(
|
||||||
|
structMap_LOGICAL.find(f'./mets:div[@TYPE="{t}"]', ns) is not None
|
||||||
|
for t in ["multivolume_work", "periodical"]
|
||||||
|
):
|
||||||
return []
|
return []
|
||||||
else:
|
else:
|
||||||
raise ValueError("No structMap[@TYPE='PHYSICAL'] found (but not a multivolume work)")
|
raise ValueError("No structMap[@TYPE='PHYSICAL'] found (but not a multivolume work)")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue