Chrome: use new JSON API

This commit is contained in:
Steffen Lange 2023-12-27 12:11:52 +01:00
parent e5de81ae4c
commit a6ee338a5f

View file

@ -5,8 +5,8 @@ class GoogleChrome extends PatchBase {
parent::__construct('Google', 'Chrome', 'https://www.google.de/chrome/');
}
function check() : bool {
if ($this->fetch('https://omahaproxy.appspot.com/all'))
return $this->parse('/win64,stable,([\d\.]+),/');
if ($this->fetch_json('https://versionhistory.googleapis.com/v1/chrome/platforms/win64/channels/stable/versions'))
return $this->parse_json('version');
return false;
}
}