From 87f0d160282eec39e14dd045515e427adb1e9067 Mon Sep 17 00:00:00 2001 From: YoursFunny Date: Tue, 16 Jul 2024 14:28:49 +0800 Subject: [PATCH] fix regex https pattern --- utils/regex.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/regex.py b/utils/regex.py index cf5d72a..a82de13 100644 --- a/utils/regex.py +++ b/utils/regex.py @@ -1,8 +1,8 @@ import re x_url = re.compile(r"^(?:https?://)?(?:www\.|mobile\.)?(?:x|twitter|fixvx|vxtwitter)\.com/(.+)/status/(\d+)") -x_media_url = re.compile(r"^(?:https?://)(pbs|video)\.twimg\.com/(.*)") -x_tco_url = re.compile(r"(?:https?://)t\.co/.+$", re.M) +x_media_url = re.compile(r"^(?:https?://)?(pbs|video)\.twimg\.com/(.*)") +x_tco_url = re.compile(r"(?:https?://)?t\.co/.+$", re.M) message_url = re.compile(r"\[.+]", re.S) pixiv_url = re.compile(r"^(?:https?://)?(?:www\.)?pixiv\.net/(?:en/)?(?:artworks/|i/)(\d+)")