From 41dd69c8cbbf71b096fc0e7745248551d04724cd Mon Sep 17 00:00:00 2001 From: "Benjamin M. Gyori" Date: Thu, 15 Feb 2024 04:47:34 -0500 Subject: [PATCH] Update UMLS version path in HTML (#34) * Update UMLS version path in HTML * Update setup.cfg --------- Co-authored-by: Charles Tapley Hoyt --- setup.cfg | 1 + src/bioversions/sources/umls.py | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index af67e892..ed372cc7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -56,6 +56,7 @@ install_requires = pyyaml tqdm bioregistry[align]>=0.10.0 + pandas # remove after deploying https://github.com/biopragmatics/bioregistry/pull/1047 lxml psycopg2-binary diff --git a/src/bioversions/sources/umls.py b/src/bioversions/sources/umls.py index 001f1e28..8896485d 100644 --- a/src/bioversions/sources/umls.py +++ b/src/bioversions/sources/umls.py @@ -23,8 +23,14 @@ class UMLSGetter(Getter): def get(self) -> datetime: """Get the latest UMLS version number.""" soup = get_soup(URL) - raw_version = soup.find("div", {"id": "body"}).find("h2") - return raw_version.text.split()[0] + version_tag = ( + soup.find("main") + .find("div", {"class": "grid-row grid-gap-1"}) + .find("div", {"class": "tablet:grid-col-12"}) + .find("h2") + ) + version = version_tag.text.split()[0] + return version if __name__ == "__main__":