Skip to content

Instantly share code, notes, and snippets.

@dogweather
Last active April 11, 2022 02:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dogweather/356d759824561a014aa88c550cae493e to your computer and use it in GitHub Desktop.
Save dogweather/356d759824561a014aa88c550cae493e to your computer and use it in GitHub Desktop.
################################################
# 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)
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment