mirror of
https://github.com/RROrg/rr.git
synced 2025-08-27 23:16:59 +08:00
Compare commits
2 Commits
a3d6e0e570
...
4a3339de15
Author | SHA1 | Date | |
---|---|---|---|
|
4a3339de15 | ||
|
f53d019c04 |
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,25 +103,28 @@ def getpats(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
|
||||||
|
|
||||||
models = []
|
models = []
|
||||||
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 platforms:
|
||||||
if arch not in platforms:
|
continue
|
||||||
continue
|
if name in models:
|
||||||
if name in models:
|
continue
|
||||||
continue
|
models.append(name)
|
||||||
models.append(name)
|
|
||||||
|
|
||||||
pats = {}
|
pats = {}
|
||||||
for M in models:
|
for M in models:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user