From ddb9dc87d75cbabfaab3a040be80696f79d22711 Mon Sep 17 00:00:00 2001 From: msramalho <19508417+msramalho@users.noreply.github.com> Date: Wed, 20 Sep 2023 10:17:31 +0100 Subject: [PATCH] unfortunately needed twitter->x --- src/auto_archiver/archivers/twitter_archiver.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/auto_archiver/archivers/twitter_archiver.py b/src/auto_archiver/archivers/twitter_archiver.py index aa764da..787fa39 100644 --- a/src/auto_archiver/archivers/twitter_archiver.py +++ b/src/auto_archiver/archivers/twitter_archiver.py @@ -15,8 +15,8 @@ class TwitterArchiver(Archiver): """ name = "twitter_archiver" - link_pattern = re.compile(r"twitter.com\/(?:\#!\/)?(\w+)\/status(?:es)?\/(\d+)") - link_clean_pattern = re.compile(r"(.+twitter\.com\/.+\/\d+)(\?)*.*") + link_pattern = re.compile(r"(?:twitter|x).com\/(?:\#!\/)?(\w+)\/status(?:es)?\/(\d+)") + link_clean_pattern = re.compile(r"(.+(?:twitter|x)\.com\/.+\/\d+)(\?)*.*") def __init__(self, config: dict) -> None: super().__init__(config)