diff --git a/README.md b/README.md index ee59d03..9a3c35e 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,7 @@ echo "deb [signed-by=/etc/apt/keyrings/wcbing.gpg] https://packages.wcbing.top/d |Microsoft Edge|microsoft-edge-stable|[官网](https://www.microsoft.com/en-us/edge/download)| |Google Chrome|google-chrome-stable|[官网](https://www.google.com/chrome/)| |Obsidian|obsidian|[Github Releases](https://github.com/obsidianmd/obsidian-releases/releases)| +|WPS Office|wps-office|[官网](https://linux.wps.cn/)| ## 自行建立仓库 diff --git a/get/wps.py b/get/wps.py new file mode 100644 index 0000000..43c5eb4 --- /dev/null +++ b/get/wps.py @@ -0,0 +1,34 @@ +import requests +import re +import time +import hashlib +from module.check import deb + +res = requests.get("https://linux.wps.cn/") +res.encoding = "utf-8" + +version = re.findall(r"

(.*)

", res.text)[0] + +"""js +function downLoad(url) { + var urlObj = new URL(url); + var uri = urlObj.pathname; + var secrityKey = "7f8faaaa468174dc1c9cd62e5f218a5b"; + var timestamp10 = Math.floor(new Date().getTime() / 1000); + var md5hash = CryptoJS.MD5(secrityKey + uri + timestamp10); + url += '?t=' + timestamp10 + '&k=' + md5hash + console.log(url); +} +""" + +secrityKey = "7f8faaaa468174dc1c9cd62e5f218a5b" +timestamp10 = str(int(time.time())) + +x64_deb_url = re.findall(r"https://.*/wps/download/.*_amd64.deb", res.text)[0] +x64_deb_pathname = "/" + "/".join(x64_deb_url.split("/")[3:]) +x64_deb_md5hash = hashlib.md5(str.encode(secrityKey + x64_deb_pathname + timestamp10)) +x64_deb_url += '?t=' + timestamp10 + '&k=' + x64_deb_md5hash.hexdigest() + +# print(version, x64_deb_url) + +deb("wps-office", version, x64_deb_url)