Skip to content

Commit

Permalink
handle times with a newline between hours and minutes
Browse files Browse the repository at this point in the history
  • Loading branch information
struan committed Mar 17, 2017
1 parent 8c26cad commit 97d679c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyscraper/new_hansard.py
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,7 @@ def parse_time(self, tag):
time_txt = u''.join(tag.xpath('.//text()'))
if time_txt == '':
return
matches = re.match('(\d+)(?:[:.](\d+))?[\xa0\s]*(am|pm)', time_txt)
matches = re.match('(\d+)(?:[:.\n](\d+))?[\xa0\s]*(am|pm)', time_txt)
if matches:
hours = int(matches.group(1))
minutes = int(matches.group(2) or 0)
Expand Down

0 comments on commit 97d679c

Please sign in to comment.