adsabs / ADSIngestParser

Curation parser library
MIT License
0 stars 7 forks source link

Elsevier parser will fail on keyword parsing if the tag `<ce:keywords>` does not exist #87

Closed seasidesparrow closed 9 months ago

seasidesparrow commented 9 months ago

Describe the bug If the record_meta body does not contain a ce:keywords tag, then ElsevierParser will fail at L305 because it tries to do a subsequent .find(ce:section-title) on the None returned from the first find

To Reproduce Parse the file /proj/ads/abstracts/data/ELS/CONSYN.GEO.new/2451-9294/S2451929418X00035/S2451929419300336/S2451929419300336.xml

Additional context This can be fixed easily by wrapping the two-part find inside of a find that's limited to just the .find("ce.keywords"). If the first find returns nothing, it won't try the two-part find.