mirror of
https://github.com/RROrg/rr.git
synced 2025-08-25 22:17:25 +08:00
Compare commits
2 Commits
4a3339de15
...
a3d6e0e570
Author | SHA1 | Date | |
---|---|---|---|
|
a3d6e0e570 | ||
|
6ef3233512 |
BIN
docs/addons.xlsx
BIN
docs/addons.xlsx
Binary file not shown.
BIN
docs/models.xlsx
BIN
docs/models.xlsx
Binary file not shown.
Binary file not shown.
2085
docs/pats.json
2085
docs/pats.json
File diff suppressed because it is too large
Load Diff
BIN
docs/pats.xlsx
BIN
docs/pats.xlsx
Binary file not shown.
@ -103,28 +103,25 @@ def getpats(workpath, jsonpath, xlsxpath):
|
||||
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
|
||||
|
||||
try:
|
||||
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 = session.get("https://autoupdate.synology.com/os/v2", timeout=10, verify=False)
|
||||
req.encoding = "utf-8"
|
||||
p = re.compile(r"<mUnique>(.*?)</mUnique>.*?<mLink>(.*?)</mLink>", re.MULTILINE | re.DOTALL)
|
||||
data = p.findall(req.text)
|
||||
data = json.loads(req.text)
|
||||
except Exception as e:
|
||||
click.echo(f"Error: {e}")
|
||||
return
|
||||
|
||||
models = []
|
||||
for item in data:
|
||||
if not "DSM" in item[1]:
|
||||
for item in data["channel"]["item"]:
|
||||
if not item["title"].startswith("DSM"):
|
||||
continue
|
||||
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)
|
||||
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)
|
||||
|
||||
pats = {}
|
||||
for M in models:
|
||||
|
Loading…
x
Reference in New Issue
Block a user