Grafana: Query website instead of GitHub

This commit is contained in:
Steffen Lange 2021-03-04 17:32:02 +01:00
parent 8e1386bfa6
commit 80a7b42171

View file

@ -5,8 +5,8 @@ class Grafana extends PatchBase {
parent::__construct('Grafana Labs', 'Grafana', 'https://grafana.com/grafana/download');
}
function check() : bool {
if ($this->fetch_json('https://api.github.com/repos/grafana/grafana/releases/latest'))
return $this->parse_json('tag_name');
if ($this->fetch('https://grafana.com/grafana/download'))
return $this->parse('/selected="" value="([\d\.]+)"/');
return false;
}
}