Private
Public Access
1
0

remove logging

This commit is contained in:
2024-06-19 17:41:25 +02:00
parent ffc8c65ed9
commit 3514ab515b
3 changed files with 3 additions and 21 deletions

View File

@@ -335,12 +335,13 @@ class PowerZonesField(models.TextField):
#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'
#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'
c2url = 'https://www.concept2.com/records?record_type=world&machine=rower&event=&gender=&age_category=&weight_class=&adaptive_rower=0'
def update_records(url=c2url, verbose=True):
ssl._create_default_https_context = ssl._create_unverified_context
try:
response = requests.get(url)
dfs = pd.read_html(url, attrs={'class': 'views-table'})
df = dfs[0]
df.columns = df.columns.str.strip()