From a59fe47cac152a7dbb5d14d0525f7c97eb5f84e7 Mon Sep 17 00:00:00 2001 From: adryd Date: Tue, 20 Jul 2021 00:17:57 -0400 Subject: [PATCH] Fix link regex to match pre-snowflake tweet IDs --- twitfix.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/twitfix.py b/twitfix.py index 5ea2e81..b1ac306 100644 --- a/twitfix.py +++ b/twitfix.py @@ -8,7 +8,7 @@ import re import os app = Flask(__name__) -pathregex = re.compile("\\w{1,15}\\/status\\/\\d{19}") +pathregex = re.compile("\\w{1,15}\\/status\\/\\d{2,20}") discord_user_agents = ["Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0", "Mozilla/5.0 (compatible; Discordbot/2.0; +https://discordapp.com)"] telegram_user_agents = ["TelegramBot (like TwitterBot)"]