Skip to content

Commit

Permalink
Merge pull request #2 from filips123/fix-menu-date-regex
Browse files Browse the repository at this point in the history
Fix menu date regex
  • Loading branch information
filips123 authored Jan 21, 2021
2 parents 6271e36 + 01130ee commit 0b49d92
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion API/gimvicurnik/updaters/menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ def _get_date(url):
}

# Example: KOSILO-4jan-8jan-2021.pdf
date = re.search(r"(?:KOSILO|MALICA)-(\d+)([a-z]+)-\d+[a-z]+-(\d+).pdf", url)
# Another example: KOSILO-25jan-29jan-2021-PDF.pdf
date = re.search(r"(?:KOSILO|MALICA)-(\d+)([a-z]+)-\d+[a-z]+-(\d+)(?i:-PDF)?.pdf", url)

if date:
return datetime.date(
Expand Down

0 comments on commit 0b49d92

Please sign in to comment.