diff options
author | sam <mail@samueljenks.me> | 2022-10-12 17:12:31 +1300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-12 09:42:31 +0530 |
commit | 82fb2357d90ace7a321f5c5fa55cd1a5bdb01578 (patch) | |
tree | a128f98c29bec17b64f38584a0dbc30f5266875a /yt_dlp/extractor/twitter.py | |
parent | 13b2ae29c2056c5306c3b735e801e9b091a33739 (diff) | |
download | hypervideo-pre-82fb2357d90ace7a321f5c5fa55cd1a5bdb01578.tar.lz hypervideo-pre-82fb2357d90ace7a321f5c5fa55cd1a5bdb01578.tar.xz hypervideo-pre-82fb2357d90ace7a321f5c5fa55cd1a5bdb01578.zip |
[extractor/twitter] Add onion site to `_VALID_URL` (#5208)
See #3053
Authored by: DoubleCouponDay
Diffstat (limited to 'yt_dlp/extractor/twitter.py')
-rw-r--r-- | yt_dlp/extractor/twitter.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/yt_dlp/extractor/twitter.py b/yt_dlp/extractor/twitter.py index 771a58ab4..f007454dc 100644 --- a/yt_dlp/extractor/twitter.py +++ b/yt_dlp/extractor/twitter.py @@ -28,7 +28,7 @@ from ..utils import ( class TwitterBaseIE(InfoExtractor): _API_BASE = 'https://api.twitter.com/1.1/' - _BASE_REGEX = r'https?://(?:(?:www|m(?:obile)?)\.)?twitter\.com/' + _BASE_REGEX = r'https?://(?:(?:www|m(?:obile)?)\.)?(?:twitter\.com|twitter3e4tixl4xyajtrzo62zg5vztmjuricljdp2c5kshju4avyoid\.onion)/' _GUEST_TOKEN = None def _extract_variant_formats(self, variant, video_id): @@ -515,6 +515,10 @@ class TwitterIE(TwitterBaseIE): 'playlist_count': 4, 'params': {'skip_download': True}, }, { + # onion route + 'url': 'https://twitter3e4tixl4xyajtrzo62zg5vztmjuricljdp2c5kshju4avyoid.onion/TwitterBlue/status/1484226494708662273', + 'only_matching': True, + }, { # Twitch Clip Embed 'url': 'https://twitter.com/GunB1g/status/1163218564784017422', 'only_matching': True, |