diff options
Diffstat (limited to '')
-rw-r--r-- | config.example.ini | 2 | ||||
-rwxr-xr-x | weekly.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/config.example.ini b/config.example.ini index 1d0e947..9a4872b 100644 --- a/config.example.ini +++ b/config.example.ini @@ -6,7 +6,7 @@ community_time_page_number = 2 aod_page_number = -1 [weekly_menu] -sender = Patrick.Li@compass-group.com.cn +sender = Patrick.LI@sodexo.com query_string = YKPao-SJ weekly menu subject_regex = YKPao-SJ weekly menu \((.+?) ([0-9]?[0-9])(st|nd|rd|th)? ?- ?(.+?) ([0-9]?[0-9])(st|nd|rd|th)?\) subject_regex_four_groups = 1 2 4 5 @@ -639,11 +639,11 @@ def download_menu( ): try: subject_1st_month = datetime.datetime.strptime( - matched_groups[0], "%B" + matched_groups[0], "%b" # issues here are probably locales ).month subject_1st_day = int(matched_groups[1]) except ValueError: - raise ValueError(hit["resource"]["subject"]) from None + raise ValueError(hit["resource"]["subject"], matched_groups[0]) if ( subject_1st_month == datetime_target.month and subject_1st_day == datetime_target.day |