Browse Source

[twitter:card] Relax _VALID_URL (closes #11225)

totalwebcasting
Sergey M․ 8 years ago
parent
commit
748a462fbe
No known key found for this signature in database GPG Key ID: 2C393E0F18A9236D
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      youtube_dl/extractor/twitter.py

+ 4
- 1
youtube_dl/extractor/twitter.py View File

@ -25,7 +25,7 @@ class TwitterBaseIE(InfoExtractor):
class TwitterCardIE(TwitterBaseIE): class TwitterCardIE(TwitterBaseIE):
IE_NAME = 'twitter:card' 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 = [ _TESTS = [
{ {
'url': 'https://twitter.com/i/cards/tfw/v1/560070183650213889', 'url': 'https://twitter.com/i/cards/tfw/v1/560070183650213889',
@ -84,6 +84,9 @@ class TwitterCardIE(TwitterBaseIE):
'title': 'Twitter web player', 'title': 'Twitter web player',
'thumbnail': 're:^https?://.*\.jpg', 'thumbnail': 're:^https?://.*\.jpg',
}, },
}, {
'url': 'https://twitter.com/i/videos/752274308186120192',
'only_matching': True,
}, },
] ]


Loading…
Cancel
Save