Compare commits

..

2 Commits

Author SHA1 Message Date
github-actions[bot]
4a3339de15 update 2025-01-18 12:13:22 2025-01-18 12:13:22 +08:00
Ing
f53d019c04 更新 getmodels 函数使用的链接 2025-01-18 11:52:32 +08:00
6 changed files with 2099 additions and 13 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -103,25 +103,28 @@ def getpats(workpath, jsonpath, xlsxpath):
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
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"
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:
click.echo(f"Error: {e}")
return
models = []
for item in data["channel"]["item"]:
if not item["title"].startswith("DSM"):
for item in data:
if not "DSM" in item[1]:
continue
for model in item["model"]:
arch = model["mUnique"].split("_")[1].lower()
name = model["mLink"].split("/")[-1].split("_")[1].replace("%2B", "+")
if arch not in platforms:
continue
if name in models:
continue
models.append(name)
arch = item[0].split("_")[1]
name = item[1].split("/")[-1].split("_")[1].replace("%2B", "+")
if arch not in platforms:
continue
if name in models:
continue
models.append(name)
pats = {}
for M in models: