Skip to content

Commit

Permalink
Update UMLS version path in HTML (#34)
Browse files Browse the repository at this point in the history
* Update UMLS version path in HTML

* Update setup.cfg

---------

Co-authored-by: Charles Tapley Hoyt <cthoyt@gmail.com>
  • Loading branch information
bgyori and cthoyt authored Feb 15, 2024
1 parent 6702bfb commit 41dd69c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 8 additions & 2 deletions src/bioversions/sources/umls.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__":
Expand Down

0 comments on commit 41dd69c

Please sign in to comment.