Compare commits

...

2 Commits

Author SHA1 Message Date
github-actions[bot]
a3d6e0e570 update 2025-01-18 10:27:58 2025-01-18 10:27:58 +08:00
Ing
6ef3233512 更新 getmodels 函数使用的链接 2025-01-18 10:11:29 +08:00
6 changed files with 110 additions and 24 deletions

Binary file not shown.

View File

@ -5,7 +5,14 @@
"7.1": "4.4.180", "7.1": "4.4.180",
"7.2": "4.4.302" "7.2": "4.4.302"
}, },
"models": [] "models": [
"DS1019+",
"DS620slim",
"DS218+",
"DS418play",
"DS718+",
"DS918+"
]
}, },
"broadwell": { "broadwell": {
"productvers": { "productvers": {
@ -13,7 +20,17 @@
"7.1": "4.4.180", "7.1": "4.4.180",
"7.2": "4.4.302" "7.2": "4.4.302"
}, },
"models": [] "models": [
"FS3400",
"RS3618xs",
"DS3617xs",
"DS3617xsII",
"FS2017",
"RS18017xs+",
"RS3617RPxs",
"RS3617xs+",
"RS4017xs+"
]
}, },
"broadwellnk": { "broadwellnk": {
"productvers": { "productvers": {
@ -21,7 +38,19 @@
"7.1": "4.4.180", "7.1": "4.4.180",
"7.2": "4.4.302" "7.2": "4.4.302"
}, },
"models": [] "models": [
"DS1621xs+",
"DS3622xs+",
"FS3600",
"RS1619xs+",
"RS3621RPxs",
"RS3621xs+",
"RS4021xs+",
"SA3400",
"SA3600",
"DS3018xs",
"FS1018"
]
}, },
"broadwellnkv2": { "broadwellnkv2": {
"productvers": { "productvers": {
@ -29,7 +58,11 @@
"7.1": "4.4.180", "7.1": "4.4.180",
"7.2": "4.4.302" "7.2": "4.4.302"
}, },
"models": [] "models": [
"FS3410",
"SA3410",
"SA3610"
]
}, },
"broadwellntbap": { "broadwellntbap": {
"productvers": { "productvers": {
@ -37,7 +70,10 @@
"7.1": "4.4.180", "7.1": "4.4.180",
"7.2": "4.4.302" "7.2": "4.4.302"
}, },
"models": [] "models": [
"SA3200D",
"SA3400D"
]
}, },
"denverton": { "denverton": {
"productvers": { "productvers": {
@ -45,7 +81,19 @@
"7.1": "4.4.180", "7.1": "4.4.180",
"7.2": "4.4.302" "7.2": "4.4.302"
}, },
"models": [] "models": [
"DS1819+",
"DS2419+",
"DS2419+II",
"DVA3219",
"DVA3221",
"RS820+",
"RS820RP+",
"DS1618+",
"RS2418+",
"RS2418RP+",
"RS2818RP+"
]
}, },
"geminilake": { "geminilake": {
"productvers": { "productvers": {
@ -53,7 +101,16 @@
"7.1": "4.4.180", "7.1": "4.4.180",
"7.2": "4.4.302" "7.2": "4.4.302"
}, },
"models": [] "models": [
"DS1520+",
"DS220+",
"DS224+",
"DS420+",
"DS423+",
"DS720+",
"DS920+",
"DVA1622"
]
}, },
"purley": { "purley": {
"productvers": { "productvers": {
@ -61,7 +118,10 @@
"7.1": "4.4.180", "7.1": "4.4.180",
"7.2": "4.4.302" "7.2": "4.4.302"
}, },
"models": [] "models": [
"FS6400",
"HD6500"
]
}, },
"r1000": { "r1000": {
"productvers": { "productvers": {
@ -69,7 +129,12 @@
"7.1": "4.4.180", "7.1": "4.4.180",
"7.2": "4.4.302" "7.2": "4.4.302"
}, },
"models": [] "models": [
"DS1522+",
"DS723+",
"DS923+",
"RS422+"
]
}, },
"v1000": { "v1000": {
"productvers": { "productvers": {
@ -77,13 +142,30 @@
"7.1": "4.4.180", "7.1": "4.4.180",
"7.2": "4.4.302" "7.2": "4.4.302"
}, },
"models": [] "models": [
"DS1621+",
"DS1821+",
"DS1823xs+",
"DS2422+",
"FS2500",
"RS1221+",
"RS1221RP+",
"RS2421+",
"RS2421RP+",
"RS2423+",
"RS2423RP+",
"RS2821RP+",
"RS822+",
"RS822RP+"
]
}, },
"epyc7002": { "epyc7002": {
"productvers": { "productvers": {
"7.1": "7.1-5.10.55", "7.1": "7.1-5.10.55",
"7.2": "7.2-5.10.55" "7.2": "7.2-5.10.55"
}, },
"models": [] "models": [
"SA6400"
]
} }
} }

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -6,7 +6,7 @@
# See /LICENSE for more information. # See /LICENSE for more information.
# #
import os, sys, glob, json, yaml, click, shutil, tarfile, kmodule, requests, urllib3 import os, re, sys, glob, json, yaml, click, shutil, tarfile, kmodule, requests, urllib3
from requests.adapters import HTTPAdapter from requests.adapters import HTTPAdapter
from requests.packages.urllib3.util.retry import Retry # type: ignore from requests.packages.urllib3.util.retry import Retry # type: ignore
from openpyxl import Workbook from openpyxl import Workbook
@ -44,24 +44,28 @@ def getmodels(workpath, jsonpath, xlsxpath):
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
try: try:
req = session.get("https://autoupdate.synology.com/os/v2", timeout=10, verify=False) url = "http://update7.synology.com/autoupdate/genRSS.php?include_beta=1"
#url = "https://update7.synology.com/autoupdate/genRSS.php?include_beta=1"
req = session.get(url, timeout=10, verify=False)
req.encoding = "utf-8" req.encoding = "utf-8"
data = json.loads(req.text) p = re.compile(r"<mUnique>(.*?)</mUnique>.*?<mLink>(.*?)</mLink>", re.MULTILINE | re.DOTALL)
data = p.findall(req.text)
except Exception as e: except Exception as e:
click.echo(f"Error: {e}") click.echo(f"Error: {e}")
return return
for item in data["channel"]["item"]: for item in data:
if not item["title"].startswith("DSM"): if not "DSM" in item[1]:
continue continue
for model in item["model"]: arch = item[0].split("_")[1]
arch = model["mUnique"].split("_")[1].lower() name = item[1].split("/")[-1].split("_")[1].replace("%2B", "+")
name = model["mLink"].split("/")[-1].split("_")[1].replace("%2B", "+") if arch not in models:
if arch not in models: continue
continue if name in (A for B in models for A in models[B]["models"]):
if name in (A for B in models for A in models[B]["models"]): continue
continue models[arch]["models"].append(name)
models[arch]["models"].append(name)
if jsonpath: if jsonpath:
with open(jsonpath, "w") as f: with open(jsonpath, "w") as f: