提高移动端参数正则匹配兼容性 (#40)
Some checks are pending
Docker Publish / build-and-push (push) Waiting to run

* feat(mparam): new regular expression matching method

* chore(mparam): remove unnecessary comments

- 移除不必要的注释

---------

Co-authored-by: Bela Proinsias <naythan@foxmail.com>
Co-authored-by: Cp0204 <Cp0204@qq.com>
This commit is contained in:
Vin 2024-11-17 23:42:13 +08:00 committed by GitHub
parent c5662644da
commit ec767e2a4b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -110,9 +110,9 @@ class Quark:
def match_mparam_form_cookie(self, cookie):
mparam = {}
kps_match = re.search(r"(?<!\w)kps=([a-zA-Z0-9%]+)[;&]?", cookie)
sign_match = re.search(r"(?<!\w)sign=([a-zA-Z0-9%]+)[;&]?", cookie)
vcode_match = re.search(r"(?<!\w)vcode=([a-zA-Z0-9%]+)[;&]?", cookie)
kps_match = re.search(r"(?<!\w)kps=([a-zA-Z0-9%+/=]+)[;&]?", cookie)
sign_match = re.search(r"(?<!\w)sign=([a-zA-Z0-9%+/=]+)[;&]?", cookie)
vcode_match = re.search(r"(?<!\w)vcode=([a-zA-Z0-9%+/=]+)[;&]?", cookie)
if kps_match and sign_match and vcode_match:
mparam = {
"kps": kps_match.group(1).replace("%25", "%"),