wcbing-apt-repo/get/linuxqq.py
2024-07-25 18:40:54 +08:00

17 lines
508 B
Python

import requests
import re
import json
from module.check import check_download
res = requests.get("https://qq-web.cdn-go.cn/im.qq.com_new/f2ff7664/rainbow/linuxQQDownload.js")
res.encoding = "utf-8"
download_list_json = re.search(r"var params\s*=\s*(\{.*?\});", res.text, re.DOTALL).group(1)
download_list = json.loads(download_list_json)
version = download_list["version"]
x64_deb_url = download_list["x64DownloadUrl"]["deb"]
# print(version, x64_deb_url)
check_download("linuxqq", version, x64_deb_url)