KewBridge / specimens2illustrations

1 stars 1 forks source link

Extra Retrieval of Description Data in xml2illustrationdata.py #21

Closed ErenKarabey closed 12 months ago

ErenKarabey commented 12 months ago

Following code gather extra description data.

elements = soup.find_all('tp:treatment-sec', attrs={'sec-type': 'Description'})
            if len(elements) == 0:
                elements = soup.find_all('tp:treatment-sec', attrs={'sec-type': 'description'})

In the first paper, 1 extra element is retrieved. This element does not have a corresponding Figure to write intooutput_file. This is further shown via:

len(elements)
#Returns 46

but there are 45 botanic illustrations in its output_file. This may happen in other papers as well.