def DownloadActivity(self, serviceRecord, activity):
        workout_id = activity.ServiceData["ID"]

        session = self._get_session(record=serviceRecord)

        res = session.get(workout_id % "http://www.trainerroad.com/cycling/rides/download/%d")

        if res.status_code == 500:
            # Account is private (or their site is borked), log in the blegh way
            session = self._get_session(record=serviceRecord, cookieAuth=True)
            res = session.get("http://www.trainerroad.com/cycling/rides/download/%d" % workout_id)
            activity.Private = True

        try:
            TCXIO.Parse(res.content, activity)
        except ValueError as e:
            raise APIExcludeActivity("TCX parse error " + str(e), user_exception=UserException(UserExceptionType.Corrupt))

        return activity
dataset/ETHPy150Open cpfair/tapiriik/tapiriik/services/TrainerRoad/trainerroad.py/TrainerRoadService.DownloadActivity/swapped operands of `%`