From a5ae2321c5cc2d1ecadbd954e5f515c2301fae5a Mon Sep 17 00:00:00 2001 From: YoursFunny Date: Fri, 22 Mar 2024 19:02:38 +0800 Subject: [PATCH] fix regex pattern --- common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common.py b/common.py index 2e37077..d65e978 100644 --- a/common.py +++ b/common.py @@ -14,7 +14,7 @@ if WEBHOOK: WEBHOOK_CERT = os.getenv("WEBHOOK_CERT", "cert/cert.pem") WEBHOOK_SECRET_TOKEN = os.getenv("WEBHOOK_SECRET_TOKEN") -x_url_regex = re.compile(r"^(?:https?://)(?:www\.|mobile\.|)(x|twitter)\.com/.+/status/(\d+)") +x_url_regex = re.compile(r"^(?:https?://)(?:www\.|mobile\.|)(?:x|twitter)\.com/.+/status/(\d+)") x_media_regex = re.compile(r"^(?:https?://)(pbs|video)\.twimg\.com/(.*)") x_tco_regex = re.compile(r"(?:https?://)t\.co/.+$", re.M)