7-Zip: use Github api

This commit is contained in:
Steffen Lange 2024-05-31 19:08:54 +02:00
parent 96154af588
commit 81687b2adf

View file

@ -5,8 +5,8 @@ class SevenZip extends PatchBase {
parent::__construct('Igor Pavlov', '7-Zip', 'https://www.7-zip.org/download.html'); parent::__construct('Igor Pavlov', '7-Zip', 'https://www.7-zip.org/download.html');
} }
function check() : bool { function check() : bool {
if ($this->fetch('https://www.7-zip.org/download.html')) if ($this->fetch_json('https://api.github.com/repos/ip7z/7zip/releases/latest'))
return $this->parse('/Download 7-Zip ([\d\.]+) \([\d-]+\)/'); return $this->parse_json('tag_name');
return false; return false;
} }
} }