Last active
September 1, 2020 15:41
-
-
Save webdevwilson/9611760a563fb125cabadc247c1761d1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getZones(id) { | |
var url = 'https://app.homefitnessbuddy.com/peloton/powerzone/details/' + id; | |
var html = UrlFetchApp.fetch(url).getContentText(); | |
var doc = XmlService.parse(html); | |
var html = doc.getRootElement(); | |
var script = getElementsByClassName(html, 'body script:nth-child(1)')[0].innerText; | |
var s = eval(script); | |
return s.intervals; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment