Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Download all activities from Runtastic.com (as .gpx)

Download all activities from Runtastic 🏃

With this script you can download all your activities from www.runtastic.com in .gpx format. Runtastic removed this feature wich makes it very difficult to change your tracking service, thanks for that.

❗️ Only tested in Google Chrome 41.0+

How does it work

Login to your runtastic account and go to the page where all your activities are listed. Then open the developer tools of Chrome with CMD + OPTION + I and go to the console tab. Now copy and paste the following script in the console line and press enter. The usually content should disapear and the downloads should start. I used it to export around 290 activities and it worked fine.

$('body').html('');
$.each(index_data,function(i, value)
{
    var id = value[0],
        url = 'https://' + app_config.domain+user.run_sessions_path+value[0] + '.gpx',
        filename = 'RUNTASTIC-' + value[1] + '-' + value[0] + '.gpx';

    $.ajax({
        url: 'https://' + app_config.domain + user.run_sessions_path + id + '.gpx',
        success: function(data, textStatus, jqXHR)
        {
            if(textStatus == 'success')
            {
                $('<a/>', {
                    'href' : 'data:text/plain;charset=utf-8,' + encodeURIComponent(jqXHR.responseText),
                    'download' : filename,
                    'id' : id
                }).html(filename)
                .before(i + '. Downloaded: ')
                .after('<br/>')
                .prependTo('body');

                $('#' + id)[0].click();
            }
            else
            {
                console.log(textStatus);
            }
        },
        dataType: 'xml',
        beforeSend: function(xhr){
            xhr.setRequestHeader('X-Requested-With', ' ');
        },
    });
});
@maxheadroom

This comment has been minimized.

Show comment Hide comment
@maxheadroom

maxheadroom Feb 17, 2016

works like charm . Thank you for sharing!

works like charm . Thank you for sharing!

@antjamesbird

This comment has been minimized.

Show comment Hide comment
@antjamesbird

antjamesbird Feb 20, 2016

Great script, thanks!
Just moved all Runtastic data to strava.

Great script, thanks!
Just moved all Runtastic data to strava.

@bcambel

This comment has been minimized.

Show comment Hide comment
@bcambel

bcambel Mar 2, 2016

👍 life saver man! All data in Strava now!

bcambel commented Mar 2, 2016

👍 life saver man! All data in Strava now!

@sougat818

This comment has been minimized.

Show comment Hide comment
@sougat818

sougat818 Mar 9, 2016

A Million Thanks to you!

A Million Thanks to you!

@hranicka

This comment has been minimized.

Show comment Hide comment
@hranicka

hranicka Mar 20, 2016

Thank you a lot!

I've created a modified version which saves all data into one ZIP file.

With respect.

Thank you a lot!

I've created a modified version which saves all data into one ZIP file.

With respect.

@christianewald

This comment has been minimized.

Show comment Hide comment
@christianewald

christianewald Apr 19, 2016

I added a fix for the "401 Unauthorized" bug. I received it by a really nice guy who send me this fix. I actually don't maintain this script anymore because my activities are now already in Strava since I exported them once and I don't use Runtastic anymore because of their lack of support for usual running devices.

Here is the mail of our pleasant, helping friend (can't find him on Github):

Unfortunetaly it was not working in published version - after recent updates to runtastic page, the ajax request returns error 401 (Unauthorized). I've made some research and it turned out, they've added request headers check to prevent such mass download, but not very clever one :)

To make your script working again, you need to update request header by adding 'beforeSend' parameter to ajax call:

   beforeSend: function(xhr){
     xhr.setRequestHeader('X-Requested-With', ' ');
   },

(default value for request via ajax is XMLHttpRequest and above lines will clear it)

Owner

christianewald commented Apr 19, 2016

I added a fix for the "401 Unauthorized" bug. I received it by a really nice guy who send me this fix. I actually don't maintain this script anymore because my activities are now already in Strava since I exported them once and I don't use Runtastic anymore because of their lack of support for usual running devices.

Here is the mail of our pleasant, helping friend (can't find him on Github):

Unfortunetaly it was not working in published version - after recent updates to runtastic page, the ajax request returns error 401 (Unauthorized). I've made some research and it turned out, they've added request headers check to prevent such mass download, but not very clever one :)

To make your script working again, you need to update request header by adding 'beforeSend' parameter to ajax call:

   beforeSend: function(xhr){
     xhr.setRequestHeader('X-Requested-With', ' ');
   },

(default value for request via ajax is XMLHttpRequest and above lines will clear it)

@PattaFeuFeu

This comment has been minimized.

Show comment Hide comment
@PattaFeuFeu

PattaFeuFeu Apr 22, 2016

Worked fine with Chrome 49 on OSX. Thank you!

Worked fine with Chrome 49 on OSX. Thank you!

@23tux

This comment has been minimized.

Show comment Hide comment
@23tux

23tux May 17, 2016

Tested with Chrome Version 50.0.2661.94 (64-bit) on OSX.
Chrome asked me if I allow to download multiple files at once, then it worked like a charm!

Thanks!

23tux commented May 17, 2016

Tested with Chrome Version 50.0.2661.94 (64-bit) on OSX.
Chrome asked me if I allow to download multiple files at once, then it worked like a charm!

Thanks!

@oristelle

This comment has been minimized.

Show comment Hide comment
@oristelle

oristelle May 19, 2016

YOU ARE A GENIUS, many thanks

YOU ARE A GENIUS, many thanks

@luisfgfurtado

This comment has been minimized.

Show comment Hide comment
@luisfgfurtado

luisfgfurtado Jun 6, 2016

Works like charm. Thank you!

Works like charm. Thank you!

@jonasbits

This comment has been minimized.

Show comment Hide comment
@jonasbits

jonasbits Jun 12, 2016

Works with Chrome 51.0.2704.84 on Win10

Works with Chrome 51.0.2704.84 on Win10

@joshre

This comment has been minimized.

Show comment Hide comment
@joshre

joshre Jul 13, 2016

Marvelous, thanks!

joshre commented Jul 13, 2016

Marvelous, thanks!

@senden9

This comment has been minimized.

Show comment Hide comment
@senden9

senden9 Aug 21, 2016

Thanks. Works also with Firefox 48

senden9 commented Aug 21, 2016

Thanks. Works also with Firefox 48

@davidbalazs

This comment has been minimized.

Show comment Hide comment
@davidbalazs

davidbalazs Sep 23, 2016

thank you, it helped me a lot!

thank you, it helped me a lot!

@Dexter0912

This comment has been minimized.

Show comment Hide comment
@Dexter0912

Dexter0912 Sep 29, 2016

I can't download it!! Could You help me?
przechwytywanie1

przechwytywanie

Dexter0912 commented Sep 29, 2016

I can't download it!! Could You help me?
przechwytywanie1

przechwytywanie

@cdragicevic

This comment has been minimized.

Show comment Hide comment
@cdragicevic

cdragicevic Sep 29, 2016

Just arrived 6 hours later than the previous comment, and the same problem/errors on Chrome 49.0.2623.112 (64-bit) and OSX 10.6.8.

Maybe a problem in runtastic.com? I cant download the traditional way either, because chrome goes to the download link ending in ".gpx" and showing blank content instead of downloading it.

Just arrived 6 hours later than the previous comment, and the same problem/errors on Chrome 49.0.2623.112 (64-bit) and OSX 10.6.8.

Maybe a problem in runtastic.com? I cant download the traditional way either, because chrome goes to the download link ending in ".gpx" and showing blank content instead of downloading it.

@Dexter0912

This comment has been minimized.

Show comment Hide comment
@Dexter0912

Dexter0912 Sep 30, 2016

Got the same problem...

Got the same problem...

@luemmel

This comment has been minimized.

Show comment Hide comment
@luemmel

luemmel Oct 2, 2016

The script doesn´t work for me too (Chrome 53 OSX, FF 49 OSX): I have 300 activities: when i run the script, 2 to 4 activities can be downloaded, all other activities will fail (i debugged the script a little bit). When i try to download the activities manually, it works. IMO there is a kind of "the user is allowed to download x activities in x seconds" rule or so.

luemmel commented Oct 2, 2016

The script doesn´t work for me too (Chrome 53 OSX, FF 49 OSX): I have 300 activities: when i run the script, 2 to 4 activities can be downloaded, all other activities will fail (i debugged the script a little bit). When i try to download the activities manually, it works. IMO there is a kind of "the user is allowed to download x activities in x seconds" rule or so.

@luemmel

This comment has been minimized.

Show comment Hide comment
@luemmel

luemmel Oct 3, 2016

I did some more investigations: There is an option on runtastic.com to download the .gpx for a single activity. If you try to download the .gpx file, often an http error occurs. If you retry, sometimes the download is successful. For me, this simple change fixed the script:

error : function(xhr, textStatus, errorThrown ) {
      $.ajax(this);
    },

luemmel commented Oct 3, 2016

I did some more investigations: There is an option on runtastic.com to download the .gpx for a single activity. If you try to download the .gpx file, often an http error occurs. If you retry, sometimes the download is successful. For me, this simple change fixed the script:

error : function(xhr, textStatus, errorThrown ) {
      $.ajax(this);
    },
@rbredow

This comment has been minimized.

Show comment Hide comment
@rbredow

rbredow Oct 16, 2016

Adding @luemmel's "retry on error" code was required for me today too. For those who aren't sure where that code belongs, here is the script with the added code that worked for me:

Takes a while if you have a hundred runs to export, but you only have to do it once!

$('body').html('');
$.each(index_data,function(i, value)
{
    var id = value[0],
        url = 'https://' + app_config.domain+user.run_sessions_path+value[0] + '.gpx',
        filename = 'RUNTASTIC-' + value[1] + '-' + value[0] + '.gpx';

    $.ajax({
        url: 'https://' + app_config.domain + user.run_sessions_path + id + '.gpx',
        success: function(data, textStatus, jqXHR)
        {
            if(textStatus == 'success')
            {
                $('<a/>', {
                    'href' : 'data:text/plain;charset=utf-8,' + encodeURIComponent(jqXHR.responseText),
                    'download' : filename,
                    'id' : id
                }).html(filename)
                .before(i + '. Downloaded: ')
                .after('<br/>')
                .prependTo('body');

                $('#' + id)[0].click();
            }
            else
            {
                console.log(textStatus);
            }
        },
        error : function(xhr, textStatus, errorThrown ) {
            $.ajax(this);
        },
        dataType: 'xml',
        beforeSend: function(xhr){
            xhr.setRequestHeader('X-Requested-With', ' ');
        },
    });
});

rbredow commented Oct 16, 2016

Adding @luemmel's "retry on error" code was required for me today too. For those who aren't sure where that code belongs, here is the script with the added code that worked for me:

Takes a while if you have a hundred runs to export, but you only have to do it once!

$('body').html('');
$.each(index_data,function(i, value)
{
    var id = value[0],
        url = 'https://' + app_config.domain+user.run_sessions_path+value[0] + '.gpx',
        filename = 'RUNTASTIC-' + value[1] + '-' + value[0] + '.gpx';

    $.ajax({
        url: 'https://' + app_config.domain + user.run_sessions_path + id + '.gpx',
        success: function(data, textStatus, jqXHR)
        {
            if(textStatus == 'success')
            {
                $('<a/>', {
                    'href' : 'data:text/plain;charset=utf-8,' + encodeURIComponent(jqXHR.responseText),
                    'download' : filename,
                    'id' : id
                }).html(filename)
                .before(i + '. Downloaded: ')
                .after('<br/>')
                .prependTo('body');

                $('#' + id)[0].click();
            }
            else
            {
                console.log(textStatus);
            }
        },
        error : function(xhr, textStatus, errorThrown ) {
            $.ajax(this);
        },
        dataType: 'xml',
        beforeSend: function(xhr){
            xhr.setRequestHeader('X-Requested-With', ' ');
        },
    });
});
@Jagounet

This comment has been minimized.

Show comment Hide comment
@Jagounet

Jagounet Nov 2, 2016

Thx its ok with firefox today 👍

Jagounet commented Nov 2, 2016

Thx its ok with firefox today 👍

@GOTAY

This comment has been minimized.

Show comment Hide comment
@GOTAY

GOTAY Nov 8, 2016

I'm getting a 403 (Forbidden) errors...
Any help will be appreciated.
Using Chrome 54.0.2840.71 (resently updated)

GOTAY commented Nov 8, 2016

I'm getting a 403 (Forbidden) errors...
Any help will be appreciated.
Using Chrome 54.0.2840.71 (resently updated)

@GOTAY

This comment has been minimized.

Show comment Hide comment
@GOTAY

GOTAY Nov 8, 2016

With Firefox I can see an access denied... Just 5 activities downloaded fine...

GOTAY commented Nov 8, 2016

With Firefox I can see an access denied... Just 5 activities downloaded fine...

@laszlojohl

This comment has been minimized.

Show comment Hide comment
@laszlojohl

laszlojohl Nov 14, 2016

I'm also getting a 403 Error on Chrome Version 55.0.2883.44. Which basically means, the server denied my request. Is there a solution to circumvent the server rule?

laszlojohl commented Nov 14, 2016

I'm also getting a 403 Error on Chrome Version 55.0.2883.44. Which basically means, the server denied my request. Is there a solution to circumvent the server rule?

@cheb92

This comment has been minimized.

Show comment Hide comment
@cheb92

cheb92 Nov 15, 2016

Hi

It didn't work today for me on chrome 54.0.2840.99 and on firefox 49.0.2. Any way to workaround this problem ?

Regards

cheb92 commented Nov 15, 2016

Hi

It didn't work today for me on chrome 54.0.2840.99 and on firefox 49.0.2. Any way to workaround this problem ?

Regards

@shodyesq

This comment has been minimized.

Show comment Hide comment
@shodyesq

shodyesq Nov 16, 2016

I'm also getting the "403 (Forbidden)" error. Any solutions discovered?

I'm also getting the "403 (Forbidden)" error. Any solutions discovered?

@Metalnem

This comment has been minimized.

Show comment Hide comment
@Metalnem

Metalnem Nov 28, 2016

Runtastic recently introduced rate limiting for export requests. I wrote a little command line tool that uses Runtastic API directly to manually export every activity that has a GPS trace available. You can download it here. If you want to know more, read the two posts on the subject at my blog.

Metalnem commented Nov 28, 2016

Runtastic recently introduced rate limiting for export requests. I wrote a little command line tool that uses Runtastic API directly to manually export every activity that has a GPS trace available. You can download it here. If you want to know more, read the two posts on the subject at my blog.

@jcarias

This comment has been minimized.

Show comment Hide comment
@jcarias

jcarias Jan 25, 2017

@Metalnem Thank's it worked like a charm!

jcarias commented Jan 25, 2017

@Metalnem Thank's it worked like a charm!

@jozelito

This comment has been minimized.

Show comment Hide comment
@jozelito

jozelito Jan 31, 2017

@Metalnem, the cmd line tool works perfectly.
Thanks a lot,!!

@Metalnem, the cmd line tool works perfectly.
Thanks a lot,!!

@ScoutVik

This comment has been minimized.

Show comment Hide comment
@ScoutVik

ScoutVik Mar 6, 2017

I can save all my ACTIVITIES in Runtastic.
Is it still working or not any more?
I have a lot of activities with and without GPS too..
Thanks.

ScoutVik commented Mar 6, 2017

I can save all my ACTIVITIES in Runtastic.
Is it still working or not any more?
I have a lot of activities with and without GPS too..
Thanks.

@djforsberg

This comment has been minimized.

Show comment Hide comment
@djforsberg

djforsberg Apr 13, 2017

@Metalnem, thanks for putting together...trying to get it to work, but not getting anything...probably user error....is there a script that works? or do I need to do anything when I open your prog? thanks!

@Metalnem, thanks for putting together...trying to get it to work, but not getting anything...probably user error....is there a script that works? or do I need to do anything when I open your prog? thanks!

@DiWa51

This comment has been minimized.

Show comment Hide comment
@DiWa51

DiWa51 Apr 24, 2017

Unfortunately none of this scripts worked for me (even in forked / revised versions).

Though Thanks a lot @Metalnem.
I just downloaded your binary launch it with the 3 command line arguments and got my results few seconds later (~30s for ~80 activities). @djforsberg did you wait long enough?

DiWa51 commented Apr 24, 2017

Unfortunately none of this scripts worked for me (even in forked / revised versions).

Though Thanks a lot @Metalnem.
I just downloaded your binary launch it with the 3 command line arguments and got my results few seconds later (~30s for ~80 activities). @djforsberg did you wait long enough?

@leomiquelutti

This comment has been minimized.

Show comment Hide comment
@leomiquelutti

leomiquelutti May 9, 2017

@Metalnem it worked fine for me. Thank you very much.

@Metalnem it worked fine for me. Thank you very much.

@ERueland

This comment has been minimized.

Show comment Hide comment
@ERueland

ERueland May 16, 2017

@Metalnem - great work!
Just finished and everything is fine.
Maybe as an explanation for the rookies: download runtastic.exe (respective .exe windows/MaxOS/Linux) below "Downloads" and start the process with your e-mail, password & file version in the command line.
It takes some minutes (for some hundred excercises) and suddenly there is the .zip file with all your runtastic data!!! THANX!

ERueland commented May 16, 2017

@Metalnem - great work!
Just finished and everything is fine.
Maybe as an explanation for the rookies: download runtastic.exe (respective .exe windows/MaxOS/Linux) below "Downloads" and start the process with your e-mail, password & file version in the command line.
It takes some minutes (for some hundred excercises) and suddenly there is the .zip file with all your runtastic data!!! THANX!

@fetteotter

This comment has been minimized.

Show comment Hide comment
@fetteotter

fetteotter May 18, 2017

@Metalnem ... THANK YOUUUUU SO MUCH => for the ones who are not IT 🗡 ... download the file as @ERueland wrote ... then go to console Win2010(Win+x => powershell admin) ... then enter ".\runtastic -email xyz@xyvzde -password xyz -format tcx" in this console ... needs some time, than an archive file will appear!

@Metalnem ... THANK YOUUUUU SO MUCH => for the ones who are not IT 🗡 ... download the file as @ERueland wrote ... then go to console Win2010(Win+x => powershell admin) ... then enter ".\runtastic -email xyz@xyvzde -password xyz -format tcx" in this console ... needs some time, than an archive file will appear!

@viragored

This comment has been minimized.

Show comment Hide comment
@viragored

viragored May 19, 2017

@Metalnem - thanks so much for the code. I'm pretty much a rookie at this stuff so it took me a while to finally make it work. @fetteotter gave a good helping description, but I needed one more step before anything happened. The downloaded file went into my default download folder, and from there I copied it to C:\Windows\System32 Then the command line executed properly.
I have Windows 10 64-bit so was able to access the admin level command prompt by right click on the home (Windows) button.
And now my activities are in Strava - which is limiting uploads to 25 at a time.
Thanks once more :-)

And in case it helps any more rookies like me, here are the steps I carried out (with copy/paste from posts above, as appropriate)

  • Download Windows zip file from github (below the word "Downloads")
  • Unzip the downloaded file
  • Copy or paste the file runtastic.exe to C:\Windows\System32 - give administrator permission when prompted
  • Right click the Windows home button and choose "Command Prompt (Admin)"
  • In the command prompt window that opens type your version of:
  •  runtastic -email xyz@xyvzde -password xyz -format tcx
    
  • [Wait for the command prompt to return - the time will vary with the number of activities to download]
  • Close the command prompt window
  • Move the downloaded "Runtastic - date" zip file that will be in C:\Windows\System32 to a suitable working space
  • Delete runtastic.exe from C:\Windows\System32
  • Unzip the downloaded "Runtastic - date" zip file
  • Then use your target application to upload the activities

@Metalnem - thanks so much for the code. I'm pretty much a rookie at this stuff so it took me a while to finally make it work. @fetteotter gave a good helping description, but I needed one more step before anything happened. The downloaded file went into my default download folder, and from there I copied it to C:\Windows\System32 Then the command line executed properly.
I have Windows 10 64-bit so was able to access the admin level command prompt by right click on the home (Windows) button.
And now my activities are in Strava - which is limiting uploads to 25 at a time.
Thanks once more :-)

And in case it helps any more rookies like me, here are the steps I carried out (with copy/paste from posts above, as appropriate)

  • Download Windows zip file from github (below the word "Downloads")
  • Unzip the downloaded file
  • Copy or paste the file runtastic.exe to C:\Windows\System32 - give administrator permission when prompted
  • Right click the Windows home button and choose "Command Prompt (Admin)"
  • In the command prompt window that opens type your version of:
  •  runtastic -email xyz@xyvzde -password xyz -format tcx
    
  • [Wait for the command prompt to return - the time will vary with the number of activities to download]
  • Close the command prompt window
  • Move the downloaded "Runtastic - date" zip file that will be in C:\Windows\System32 to a suitable working space
  • Delete runtastic.exe from C:\Windows\System32
  • Unzip the downloaded "Runtastic - date" zip file
  • Then use your target application to upload the activities
@KFubuki

This comment has been minimized.

Show comment Hide comment
@KFubuki

KFubuki May 19, 2017

Thank you man!

KFubuki commented May 19, 2017

Thank you man!

@mmckaibab

This comment has been minimized.

Show comment Hide comment
@mmckaibab

mmckaibab May 22, 2017

Not working. No matter what I do it keeps coming back saying email or password is invalid. I log into Runtastic using my Google+ account.

Not working. No matter what I do it keeps coming back saying email or password is invalid. I log into Runtastic using my Google+ account.

@aaamccaffrey

This comment has been minimized.

Show comment Hide comment
@aaamccaffrey

aaamccaffrey Jun 21, 2017

I had a similar issue since I logged into Runtastic using Facebook. The way around this is to log out of Facebook (Google+ in your case), browse to Runtastic.com, click the Forgotten Password link, now enter your email address. Once an email comes in from Runtastic you can now set a standard password. Worked for me!

I had a similar issue since I logged into Runtastic using Facebook. The way around this is to log out of Facebook (Google+ in your case), browse to Runtastic.com, click the Forgotten Password link, now enter your email address. Once an email comes in from Runtastic you can now set a standard password. Worked for me!

@pdabholkar

This comment has been minimized.

Show comment Hide comment
@pdabholkar

pdabholkar Jul 8, 2017

The command line tool works like a charm. Thank you.

The command line tool works like a charm. Thank you.

@AntonioO68

This comment has been minimized.

Show comment Hide comment
@AntonioO68

AntonioO68 Jul 8, 2017

Great work! More than 650 activities downloaded...
If I may suggest, Strava has a 25 files per upload, so if possible and someone wants to spend some time on it, a 25 files folder creator would we super awesome.

Again txs!

AntonioO68 commented Jul 8, 2017

Great work! More than 650 activities downloaded...
If I may suggest, Strava has a 25 files per upload, so if possible and someone wants to spend some time on it, a 25 files folder creator would we super awesome.

Again txs!

@WYNXFIST

This comment has been minimized.

Show comment Hide comment
@WYNXFIST

WYNXFIST Jul 12, 2017

Thanks for the script, but I only get the first 5 of several hundred of my activities. What am I doing wrong? I'm using Google Chrom Version 59.0.3071.115 (Official Build) (64-bit)
Thank you in advance.

Thanks for the script, but I only get the first 5 of several hundred of my activities. What am I doing wrong? I'm using Google Chrom Version 59.0.3071.115 (Official Build) (64-bit)
Thank you in advance.

@caudan

This comment has been minimized.

Show comment Hide comment
@caudan

caudan Jul 20, 2017

@viragored Thanks, this is work it. Other code not function.

caudan commented Jul 20, 2017

@viragored Thanks, this is work it. Other code not function.

@paulo59

This comment has been minimized.

Show comment Hide comment
@paulo59

paulo59 Aug 1, 2017

I have the same issue as WYNXFIST: I can get only the first five files.
I got 403 Forbidden reply for all others.
Thanks in advance for your help.

paulo59 commented Aug 1, 2017

I have the same issue as WYNXFIST: I can get only the first five files.
I got 403 Forbidden reply for all others.
Thanks in advance for your help.

@Robyer

This comment has been minimized.

Show comment Hide comment
@Robyer

Robyer Aug 3, 2017

Scripts get only first 5 activities because Runtastic added captcha protection, so after every 5 downloads you must pass the captcha.
There is check that says whether or not you are able to download another file: https://www.runtastic.com/check_export_quota which gives response {"export_allowed":true} or {"export_allowed":false} respectively.

Metalnem's solution use different approach so that should work. See his comment: https://gist.github.com/christianewald/0009d3ce1a372a11ae82#gistcomment-1932702

Robyer commented Aug 3, 2017

Scripts get only first 5 activities because Runtastic added captcha protection, so after every 5 downloads you must pass the captcha.
There is check that says whether or not you are able to download another file: https://www.runtastic.com/check_export_quota which gives response {"export_allowed":true} or {"export_allowed":false} respectively.

Metalnem's solution use different approach so that should work. See his comment: https://gist.github.com/christianewald/0009d3ce1a372a11ae82#gistcomment-1932702

@mihalltss

This comment has been minimized.

Show comment Hide comment
@mihalltss

mihalltss Aug 9, 2017

guys that guide from @Metalnem is good just only write your login accout and password to runtastic for example runtastic -email youremail@gmail.com -password yourpassword -format tcx

and everything will be downaloaded

guys that guide from @Metalnem is good just only write your login accout and password to runtastic for example runtastic -email youremail@gmail.com -password yourpassword -format tcx

and everything will be downaloaded

@Happyfeet01

This comment has been minimized.

Show comment Hide comment
@Happyfeet01

Happyfeet01 Sep 16, 2017

i have also an Access Forbidden Problem.

i have also an Access Forbidden Problem.

@ozkar121

This comment has been minimized.

Show comment Hide comment
@ozkar121

ozkar121 Nov 23, 2017

I just made a tutorial, on how to do it!
https://www.youtube.com/watch?v=sCrBWePqoJ0

I just made a tutorial, on how to do it!
https://www.youtube.com/watch?v=sCrBWePqoJ0

@datacon2018

This comment has been minimized.

Show comment Hide comment
@datacon2018

datacon2018 Feb 27, 2018

Because the solution from @Metalnem is currently not working, at least for me. I modified the script lightly, it just waits 6 hours if the download fails, hence it took very long but at least it gets the job done at the moment until the runtastic guys find a way to prevent even this.
The first setTimeout is not needed anymore.

$('body').html('');

$.each(index_data, function(i, value) {
var seconds=5*60,
    format='.tcx'; // '.gpx'

setTimeout(

function fexport () {
    var id = value[0],
        url = 'https://' + app_config.domain+user.run_sessions_path+value[0] + format,
        filename = 'RUNTASTIC-' + value[1] + '-' + value[0] + format;

    $.ajax({
        url: 'https://' + app_config.domain + user.run_sessions_path + id + format,

        success: function(data, textStatus, jqXHR) {
            if(textStatus == 'success') {
                $('<a/>', {
                    'href' : 'data:text/plain;charset=utf-8,' + encodeURIComponent(jqXHR.responseText),
                    'download' : filename,
                    'id' : id
                }).html(filename)
                .before(i + '. Downloaded: ')
                .after('<br/>')
                .prependTo('body');

                $('#' + id)[0].click();
            }
            else {
                console.log(textStatus);
            }
        },

        error: function(jqXHR, textStatus, errorT) {
                $('<a/>', {
                    'href' : 'data:text/plain;charset=utf-8,' + encodeURIComponent(jqXHR.responseText),
                    'download' : filename,
                    'id' : id
                }).html(filename)
                .before(i + '. failed: ')
                .after(' ERR: ' + jqXHR.responseText + '.<br/>')
                .prependTo('body');

                // try again in 6 hours...and again...and again...
                setTimeout(fexport, 6*60*60*1000);
        },

        dataType: 'xml',

        beforeSend: function(xhr){
            xhr.setRequestHeader('X-Requested-With', ' ');
        },
    });


}, i*seconds*1000); 


});

datacon2018 commented Feb 27, 2018

Because the solution from @Metalnem is currently not working, at least for me. I modified the script lightly, it just waits 6 hours if the download fails, hence it took very long but at least it gets the job done at the moment until the runtastic guys find a way to prevent even this.
The first setTimeout is not needed anymore.

$('body').html('');

$.each(index_data, function(i, value) {
var seconds=5*60,
    format='.tcx'; // '.gpx'

setTimeout(

function fexport () {
    var id = value[0],
        url = 'https://' + app_config.domain+user.run_sessions_path+value[0] + format,
        filename = 'RUNTASTIC-' + value[1] + '-' + value[0] + format;

    $.ajax({
        url: 'https://' + app_config.domain + user.run_sessions_path + id + format,

        success: function(data, textStatus, jqXHR) {
            if(textStatus == 'success') {
                $('<a/>', {
                    'href' : 'data:text/plain;charset=utf-8,' + encodeURIComponent(jqXHR.responseText),
                    'download' : filename,
                    'id' : id
                }).html(filename)
                .before(i + '. Downloaded: ')
                .after('<br/>')
                .prependTo('body');

                $('#' + id)[0].click();
            }
            else {
                console.log(textStatus);
            }
        },

        error: function(jqXHR, textStatus, errorT) {
                $('<a/>', {
                    'href' : 'data:text/plain;charset=utf-8,' + encodeURIComponent(jqXHR.responseText),
                    'download' : filename,
                    'id' : id
                }).html(filename)
                .before(i + '. failed: ')
                .after(' ERR: ' + jqXHR.responseText + '.<br/>')
                .prependTo('body');

                // try again in 6 hours...and again...and again...
                setTimeout(fexport, 6*60*60*1000);
        },

        dataType: 'xml',

        beforeSend: function(xhr){
            xhr.setRequestHeader('X-Requested-With', ' ');
        },
    });


}, i*seconds*1000); 


});
@djmandix

This comment has been minimized.

Show comment Hide comment
@djmandix

djmandix Mar 7, 2018

The latest version from datacon2018 (above) doesn't work for me. Neither on Chrome (64.0.3282.186), nor on Firefox (58.0.2). I receive the following error message. Any suggestions? Vendor lock sucks so much!

Error message:
0. failed: RUNTASTIC-2011-04-05-1904281.tcx ERR: access denied.

djmandix commented Mar 7, 2018

The latest version from datacon2018 (above) doesn't work for me. Neither on Chrome (64.0.3282.186), nor on Firefox (58.0.2). I receive the following error message. Any suggestions? Vendor lock sucks so much!

Error message:
0. failed: RUNTASTIC-2011-04-05-1904281.tcx ERR: access denied.

@nokodemus

This comment has been minimized.

Show comment Hide comment
@nokodemus

nokodemus Mar 17, 2018

I think ReCaptcha is causing this issue ... it's activated on ... i think every fifth activity export ...
So as soon as you get ERR:access denied, you'll have to manually download an activity an solve ReCaptcha ...

After solving another about 5 scripted exports will work

I don't have a clue how to bypass this ... you'd have to trick Google's ReCaptcha ...

I think ReCaptcha is causing this issue ... it's activated on ... i think every fifth activity export ...
So as soon as you get ERR:access denied, you'll have to manually download an activity an solve ReCaptcha ...

After solving another about 5 scripted exports will work

I don't have a clue how to bypass this ... you'd have to trick Google's ReCaptcha ...

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