Skip to content

Instantly share code, notes, and snippets.

@hranicka
Last active October 5, 2022 01:00
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save hranicka/f297cb17034cc1d82633 to your computer and use it in GitHub Desktop.
Save hranicka/f297cb17034cc1d82633 to your computer and use it in GitHub Desktop.
Download all activities from Runtastic.com (as .gpx)

Export all your Runtastic data at once

Inspired by christianewald/runtastic-export-all-activities.md. Thank you!

Major problem of the original solution above is that it opens "Save as" dialog for each file.

Yes, it can be by-passed if you set up a browser to automatically save the file (it's set up by default).

But I don't like it.

I've improved the solution:

Bulk export from Runtastic into a ZIP file

Open runtastic.com in your browser and log in.

Then Go To the page Activites (in my case and my language https://www.runtastic.com/cs/uzivatele/jaroslav-hranicka/sportovni-aktivity ).

Open browser's Developers Console (in Chrome hit CTRL + Shift + I).

Type this script into the opened Console:

var downloadAll = function () {
	var zip = new JSZip();

	$.each(index_data, function (i, value) {
		var url = 'https://' + app_config.domain + user.run_sessions_path + value[0] + '.gpx';
		var filename = 'RUNTASTIC-' + value[1] + '-' + value[0] + '.gpx';
	
		$.ajax({
			url: url,
			async: false,
			dataType: 'xml',
			success: function(data, textStatus, jqXHR) {
				zip.file(filename, jqXHR.responseText);
				console.log('Added ' + url);
			}
		});
	});
	
	console.log('OK, ZIP is being generated...');
	saveAs(zip.generate({type:'blob'}), 'runtastic.zip');
	console.log('Done.');
};

var loadScript = function (src, onload) {
	var script = document.createElement('script');
	script.src = src;
	script.onload = onload;
	document.head.appendChild(script);
};

loadScript(
	'https://rawgit.com/Stuk/jszip/master/dist/jszip.min.js',
	loadScript('https://rawgit.com/eligrey/FileSaver.js/master/FileSaver.min.js', downloadAll)
);

And wait until the ZIP with all activities is offered to "Save as"...

Have a nice day!

Bulk import to other services (Endomondo, Strava, ...)

Use tapiriik.com! It's super easy.

You can connect eg. Endomondo + Dropbox. Then you upload your .GPX from Runtastic into Dropbox > Apps > tapiriik and click sync in tapiriik.com.

For more information, visit https://support.endomondo.com/hc/en-us/articles/213703847-File-Import

@TudorSfatosu
Copy link

how do I use JSZip while being in the console?

@leomiquelutti
Copy link

Not working for me.

@AlleSchonWeg
Copy link

Not working. Got 401 (Unauthorized) every request

@xgilbert
Copy link

Same for me. The code "randomly" worked after several attempts and reloads. Only part of my activities were downloaded though. I sometimes got "error 401" sometimes "error 403".
I assume it is due to runtastic's server itself; they have implemented the "I am not a Robot" check.

@ClaudiaDK
Copy link

Not working for me either

@KnorxThieus
Copy link

GET https://rawgit.com/eligrey/FileSaver.js/master/FileSaver.min.js net::ERR_ABORTED 404 Refused to execute script from 'https://rawgit.com/eligrey/FileSaver.js/master/FileSaver.min.js' because its MIME type ('') is not executable, and strict MIME type checking is enabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment