avec une fonction personnalisée
mets le joueur en A1 et la formule en A2
function octane(joueur) {
var url = 'https://octane.gg/players/'+joueur+'/stats/events'
var from = 'type="application/json">'
var to = '</script>'
var source = UrlFetchApp.fetch(url).getContentText()
var jsonString = source.split(from)[1].split(to)[0]
var data = JSON.parse(jsonString)
var output = [
[
'events[0].name',
'games.total',
'games.replays',
'games.wins',
'games.seconds',
'games.replaySeconds',
'matches.total',
'matches.replays',
'matches.wins',
'stats.assists',
'stats.goalParticipation',
'stats.goals',
'stats.rating',
'stats.saves',
'stats.score',
'stats.shootingPercentage',
'stats.shots'
]
]
data.props.pageProps.stats.forEach(function (stat) {
output.push([
stat.events[0].name,
stat.games.total,
stat.games.replays,
stat.games.wins,
stat.games.seconds,
stat.games.replaySeconds,
stat.matches.total,
stat.matches.replays,
stat.matches.wins,
stat.stats.assists,
stat.stats.goalParticipation,
stat.stats.goals,
stat.stats.rating,
stat.stats.saves,
stat.stats.score,
stat.stats.shootingPercentage,
stat.stats.shots
])
})
return output
}