OpenWrt: parse json file
This commit is contained in:
parent
f352fb82b3
commit
9cdf91384a
1 changed files with 2 additions and 2 deletions
|
|
@ -5,8 +5,8 @@ class OpenWrt extends PatchBase {
|
|||
parent::__construct('OpenWrt Developers', 'OpenWrt', 'https://openwrt.org/downloads');
|
||||
}
|
||||
function check() : bool {
|
||||
if ($this->fetch('https://openwrt.org/start'))
|
||||
return $this->parse('/<strong>Current stable release - OpenWrt ([\d\.]+)<\/strong>/');
|
||||
if ($this->fetch_json('https://downloads.openwrt.org/.versions.json'))
|
||||
return $this->parse_json('stable_version');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue