From 86b868c6a52a9fba2c11ceb4268c7d088d2960f6 Mon Sep 17 00:00:00 2001 From: Unknown Date: Tue, 13 Oct 2020 01:58:59 +0200 Subject: [PATCH] [Twitter/t.co] simple extractor added. modification needed. --- youtube_dlc/extractor/extractors.py | 1 + youtube_dlc/extractor/twitter.py | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/youtube_dlc/extractor/extractors.py b/youtube_dlc/extractor/extractors.py index f0860e04d..d31edd7c8 100644 --- a/youtube_dlc/extractor/extractors.py +++ b/youtube_dlc/extractor/extractors.py @@ -1268,6 +1268,7 @@ from .twitter import ( TwitterIE, TwitterAmplifyIE, TwitterBroadcastIE, + TwitterShortenerIE, ) from .udemy import ( UdemyIE, diff --git a/youtube_dlc/extractor/twitter.py b/youtube_dlc/extractor/twitter.py index 4284487db..8c35e285c 100644 --- a/youtube_dlc/extractor/twitter.py +++ b/youtube_dlc/extractor/twitter.py @@ -608,3 +608,11 @@ class TwitterBroadcastIE(TwitterBaseIE, PeriscopeBaseIE): info['formats'] = self._extract_pscp_m3u8_formats( m3u8_url, broadcast_id, m3u8_id, state, width, height) return info + + +class TwitterShortenerIE(TwitterBaseIE): + IE_NAME = 'twitter:shortener' + _VALID_URL = r'https?://t.co/' + + def _real_extract(self, url): + print(url) \ No newline at end of file