Skip to content

Commit 97d679c

Browse files
committed
handle times with a newline between hours and minutes
1 parent 8c26cad commit 97d679c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pyscraper/new_hansard.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -979,7 +979,7 @@ def parse_time(self, tag):
979979
time_txt = u''.join(tag.xpath('.//text()'))
980980
if time_txt == '':
981981
return
982-
matches = re.match('(\d+)(?:[:.](\d+))?[\xa0\s]*(am|pm)', time_txt)
982+
matches = re.match('(\d+)(?:[:.\n](\d+))?[\xa0\s]*(am|pm)', time_txt)
983983
if matches:
984984
hours = int(matches.group(1))
985985
minutes = int(matches.group(2) or 0)

0 commit comments

Comments
 (0)