|
|
@@ -165,8 +165,6 @@ def scrape_scratchings(div, this_venue):
|
|
|
name = re.sub(r' Of ', ' of ', name)
|
|
|
if name.endswith('(nz)'):
|
|
|
name = name[:-len(' (nz)')]
|
|
|
- # text = re.sub(r'e\s+', ' ', text)
|
|
|
- # text = re.sub(r'\s+', ' ', text) # Kills tabs between number and name of horse
|
|
|
temp_list = RawScratching(this_venue.name, this_venue.state, this_venue.date, race, no, name)
|
|
|
scraped_scratchings.append(temp_list)
|
|
|
return scraped_scratchings
|
|
|
@@ -301,7 +299,10 @@ def get_racenet_races(html):
|
|
|
time_string = time_match.group(1)
|
|
|
if time_string == 'TBA':
|
|
|
continue
|
|
|
- race_number = td.get('data-race-number')[1:]
|
|
|
+ if race_number:
|
|
|
+ race_number = td.get('data-race-number')[1:]
|
|
|
+ else:
|
|
|
+ continue
|
|
|
start_time = td.get('data-start-time')
|
|
|
local_time = arrow.get(date_parsed.format('YYYY-MM-DD')+' '+time_string, 'YYYY-MM-DD HH:mm').time()
|
|
|
print(start_time)
|