Bug fix GWR advance ticket date

This commit is contained in:
Edward Betts 2023-11-09 16:50:47 +00:00
parent a5eab7473d
commit e52dfb7fef

View file

@ -14,7 +14,7 @@ def extract_weekday_date(html: str) -> date | None:
"""Furthest date of GWR advance ticket booking."""
# Compile a regular expression pattern to match the relevant table row
pattern = re.compile(
r"<tr>\s*<td>Weekdays</td>\s*<td>(.*?)</td>\s*</tr>", re.DOTALL
r"<tr>\s*<td>Weekdays</td>\s*<td>(.*?)(?:\*\*)?</td>\s*</tr>", re.DOTALL
)
# Search the HTML for the pattern