OpenWrt: parse json file

This commit is contained in:
Steffen Lange 2025-06-19 18:04:33 +02:00
parent f352fb82b3
commit 9cdf91384a

View file

@ -5,8 +5,8 @@ class OpenWrt extends PatchBase {
parent::__construct('OpenWrt Developers', 'OpenWrt', 'https://openwrt.org/downloads'); parent::__construct('OpenWrt Developers', 'OpenWrt', 'https://openwrt.org/downloads');
} }
function check() : bool { function check() : bool {
if ($this->fetch('https://openwrt.org/start')) if ($this->fetch_json('https://downloads.openwrt.org/.versions.json'))
return $this->parse('/<strong>Current stable release - OpenWrt ([\d\.]+)<\/strong>/'); return $this->parse_json('stable_version');
return false; return false;
} }
} }