C2 world record table change
This commit is contained in:
@@ -309,7 +309,8 @@ class PowerZonesField(models.TextField):
|
|||||||
return self.get_deb_prep_value(value)
|
return self.get_deb_prep_value(value)
|
||||||
|
|
||||||
|
|
||||||
c2url = 'http://www.concept2.com/indoor-rowers/racing/records/world?machine=1&event=All&gender=All&age=All&weight=All'
|
#c2url = 'http://www.concept2.com/indoor-rowers/racing/records/world?machine=1&event=All&gender=All&age=All&weight=All'
|
||||||
|
c2url = 'https://www.concept2.com/indoor-rowers/racing/records/world?machine=rower&event=&gender=&age_category=&weight_class=&adaptive=0&op=Search&form_id=concept2_record_search_form#results'
|
||||||
|
|
||||||
|
|
||||||
def update_records(url=c2url, verbose=True):
|
def update_records(url=c2url, verbose=True):
|
||||||
@@ -349,7 +350,10 @@ def update_records(url=c2url, verbose=True):
|
|||||||
sex = row.Gender
|
sex = row.Gender
|
||||||
name = row.Name
|
name = row.Name
|
||||||
age = int(row.Age)
|
age = int(row.Age)
|
||||||
distance = int(row.Distance)
|
try:
|
||||||
|
distance = int(row.Distance)
|
||||||
|
except ValueError:
|
||||||
|
distance = int(row.Distance.replace(',', ''))
|
||||||
duration = float(row.Duration)
|
duration = float(row.Duration)
|
||||||
season = int(row.Season)
|
season = int(row.Season)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user