1
0
mirror of https://github.com/l1ving/youtube-dl synced 2024-12-31 01:42:59 +08:00

[imdb] Relax _VALID_URL (closes #13056)

This commit is contained in:
Sergey M․ 2017-05-14 00:32:50 +07:00
parent fa26734e07
commit b845766597
No known key found for this signature in database
GPG Key ID: 2C393E0F18A9236D

View File

@ -13,7 +13,7 @@ from ..utils import (
class ImdbIE(InfoExtractor): class ImdbIE(InfoExtractor):
IE_NAME = 'imdb' IE_NAME = 'imdb'
IE_DESC = 'Internet Movie Database trailers' IE_DESC = 'Internet Movie Database trailers'
_VALID_URL = r'https?://(?:www|m)\.imdb\.com/(?:video/[^/]+/|title/tt\d+.*?#lb-|videoplayer/)vi(?P<id>\d+)' _VALID_URL = r'https?://(?:www|m)\.imdb\.com/(?:video|title).+?[/-]vi(?P<id>\d+)'
_TESTS = [{ _TESTS = [{
'url': 'http://www.imdb.com/video/imdb/vi2524815897', 'url': 'http://www.imdb.com/video/imdb/vi2524815897',
@ -35,6 +35,9 @@ class ImdbIE(InfoExtractor):
}, { }, {
'url': 'http://www.imdb.com/videoplayer/vi1562949145', 'url': 'http://www.imdb.com/videoplayer/vi1562949145',
'only_matching': True, 'only_matching': True,
}, {
'url': 'http://www.imdb.com/title/tt4218696/videoplayer/vi2608641561',
'only_matching': True,
}] }]
def _real_extract(self, url): def _real_extract(self, url):