from dateutil.parser import isoparse
from pyrungps.parsegpx import write_parsed_to_db,check_db_for_training
from pyrungps.pygpx import GPX
+from io import BytesIO
from tempfile import NamedTemporaryFile
if attribute == "href":
if link.startswith("/trainings/"):
dummy, dummy, link = link.split('/')
- name, id, *_ = link.split('_')
+ name, *ids = link.split('_')
+ id = ids[-1]
trainings.append([ unquote(name), id ])
return trainings
print("trid=",trid)
req = requests.get("http://www.gps-sport.net/services/trainingGPX.jsp?trainingID=%s&tz=-180" % (trid), verify=False)
+
xml = etree.fromstring(req.text.encode('utf-8'))
return xml