fix update_records
This commit is contained in:
@@ -26,6 +26,8 @@ from django.contrib.admin.widgets import AdminDateWidget, AdminTimeWidget, Admin
|
||||
|
||||
import os
|
||||
import json
|
||||
import ssl
|
||||
|
||||
|
||||
import re
|
||||
import pytz
|
||||
@@ -308,6 +310,7 @@ c2url = 'https://www.concept2.com/indoor-rowers/racing/records/world?machine=row
|
||||
|
||||
|
||||
def update_records(url=c2url, verbose=True):
|
||||
ssl._create_default_https_context = ssl._create_unverified_context
|
||||
try:
|
||||
dfs = pd.read_html(url, attrs={'class': 'views-table'})
|
||||
df = dfs[0]
|
||||
|
||||
Reference in New Issue
Block a user