aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2016-11-19 01:49:13 +0700
committerSergey M․ <dstftw@gmail.com>2016-11-19 01:49:13 +0700
commit748a462fbecc9c006d8e9ed6b3f596ff1893cf39 (patch)
treedd250629dd15ab52535ecf1818643c12d0245a71
parentc131fc3372c4fc69434dbb7c79935c1587beff20 (diff)
[twitter:card] Relax _VALID_URL (closes #11225)
-rw-r--r--youtube_dl/extractor/twitter.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/youtube_dl/extractor/twitter.py b/youtube_dl/extractor/twitter.py
index 3411fcf7e..ac0b221b4 100644
--- a/youtube_dl/extractor/twitter.py
+++ b/youtube_dl/extractor/twitter.py
@@ -25,7 +25,7 @@ class TwitterBaseIE(InfoExtractor):
class TwitterCardIE(TwitterBaseIE):
IE_NAME = 'twitter:card'
- _VALID_URL = r'https?://(?:www\.)?twitter\.com/i/(?:cards/tfw/v1|videos/tweet)/(?P<id>\d+)'
+ _VALID_URL = r'https?://(?:www\.)?twitter\.com/i/(?:cards/tfw/v1|videos(?:/tweet)?)/(?P<id>\d+)'
_TESTS = [
{
'url': 'https://twitter.com/i/cards/tfw/v1/560070183650213889',
@@ -84,6 +84,9 @@ class TwitterCardIE(TwitterBaseIE):
'title': 'Twitter web player',
'thumbnail': 're:^https?://.*\.jpg',
},
+ }, {
+ 'url': 'https://twitter.com/i/videos/752274308186120192',
+ 'only_matching': True,
},
]