From 8ba73e2ec9b07b3624ee2b21b67c260ab1d0be70 Mon Sep 17 00:00:00 2001 From: Delphox Date: Fri, 17 May 2024 16:50:51 -0300 Subject: [PATCH] [twitter] match /video/ tweet urls --- gallery_dl/extractor/twitter.py | 2 +- test/results/twitter.py | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gallery_dl/extractor/twitter.py b/gallery_dl/extractor/twitter.py index 7ace6a7214..6c6a2c7805 100644 --- a/gallery_dl/extractor/twitter.py +++ b/gallery_dl/extractor/twitter.py @@ -749,7 +749,7 @@ class TwitterTweetExtractor(TwitterExtractor): """Extractor for individual tweets""" subcategory = "tweet" pattern = (BASE_PATTERN + r"/([^/?#]+|i/web)/status/(\d+)" - r"/?(?:$|\?|#|photo/)") + r"/?(?:$|\?|#|photo/|video/)") example = "https://twitter.com/USER/status/12345" def __init__(self, match): diff --git a/test/results/twitter.py b/test/results/twitter.py index 9cba93b0ef..3599b32c69 100644 --- a/test/results/twitter.py +++ b/test/results/twitter.py @@ -539,6 +539,13 @@ "#class" : twitter.TwitterTweetExtractor, }, +{ + "#url" : "https://twitter.com/perrypumas/status/1065692031626829824/video/1", + "#comment" : "/video/ URL", + "#category": ("", "twitter", "tweet"), + "#class" : twitter.TwitterTweetExtractor, +}, + { "#url" : "https://twitter.com/morino_ya/status/1392763691599237121", "#comment" : "retweet with missing media entities (#1555)",