Skip to content

Commit

Permalink
Figured out the write code to get the id w/o regex
Browse files Browse the repository at this point in the history
  • Loading branch information
bnavac committed Dec 8, 2023
1 parent cec9255 commit 22df765
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rpi_data/modules/prereq_parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ def getCataId(self, year : int):
root = tree.getroot()
try:
pdb.set_trace()
#currentCatalog = root.xpath("//*[local-name() = 'archived'][contains(text(), 'No')]")
#currentCatalog = root.xpath("//*[local-name() = 'archived']")
#tree.xpath("//*[local-name() = 'archived']")[0].getparent().getparent().attrib['id']
#TODO: Rewrite in regex
#TODO: get the catalog id from this
retCata = root.xpath("//*[local-name() = 'archived']")[0].getparent().getparent().attrib['id']
return 0
except Exception as exception:
print("Failed to get the catalog id")
Expand Down

0 comments on commit 22df765

Please sign in to comment.