Last active
April 11, 2022 02:19
-
-
Save dogweather/356d759824561a014aa88c550cae493e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################################ | |
# Each Article has a title and a number. | |
# But three of them are very difficult to parse. | |
################################################ | |
# Map Article titles to corrected numbers. | |
EXCEPTIONS = { | |
"Elements of Crimes": "9", | |
"Ne bis in idem": "20", | |
"Individual criminal responsibility": "25" | |
} | |
# Parse the title & number and possibly correct the number. | |
article_title = parse_title(html) | |
raw_number = parse_number(html) | |
article_number = EXCEPTIONS.get(article_title, raw_number) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment