[twitter] match '/photo/' Tweet URLs (#5443)

fixes regression introduced in 40c05535
This commit is contained in:
Mike Fährmann
2024-04-06 17:56:21 +02:00
parent 3346a377b3
commit 647a87d17c
2 changed files with 9 additions and 1 deletions

View File

@@ -741,7 +741,8 @@ class TwitterEventExtractor(TwitterExtractor):
class TwitterTweetExtractor(TwitterExtractor):
"""Extractor for individual tweets"""
subcategory = "tweet"
pattern = BASE_PATTERN + r"/([^/?#]+|i/web)/status/(\d+)/?(?:$|[?#])"
pattern = (BASE_PATTERN + r"/([^/?#]+|i/web)/status/(\d+)"
r"/?(?:$|\?|#|photo/)")
example = "https://twitter.com/USER/status/12345"
def __init__(self, match):