1
0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-06 01:22:35 +00:00

[toggle] Relax _VALID_URL (closes #13172)

This commit is contained in:
Sergey M․ 2017-05-20 23:06:30 +07:00
parent daa4e9ff90
commit 35a2d221a3
No known key found for this signature in database
GPG Key ID: 2C393E0F18A9236D

View File

@ -17,7 +17,7 @@ from ..utils import (
class ToggleIE(InfoExtractor): class ToggleIE(InfoExtractor):
IE_NAME = 'toggle' IE_NAME = 'toggle'
_VALID_URL = r'https?://video\.toggle\.sg/(?:en|zh)/(?:series|clips|movies)/(?:[^/]+/)+(?P<id>[0-9]+)' _VALID_URL = r'https?://video\.toggle\.sg/(?:en|zh)/(?:[^/]+/){2,}(?P<id>[0-9]+)'
_TESTS = [{ _TESTS = [{
'url': 'http://video.toggle.sg/en/series/lion-moms-tif/trailers/lion-moms-premier/343115', 'url': 'http://video.toggle.sg/en/series/lion-moms-tif/trailers/lion-moms-premier/343115',
'info_dict': { 'info_dict': {
@ -73,6 +73,12 @@ class ToggleIE(InfoExtractor):
}, { }, {
'url': 'http://video.toggle.sg/en/movies/seven-days/321936', 'url': 'http://video.toggle.sg/en/movies/seven-days/321936',
'only_matching': True, 'only_matching': True,
}, {
'url': 'https://video.toggle.sg/en/tv-show/news/may-2017-cna-singapore-tonight/fri-19-may-2017/512456',
'only_matching': True,
}, {
'url': 'http://video.toggle.sg/en/channels/eleven-plus/401585',
'only_matching': True,
}] }]
_FORMAT_PREFERENCES = { _FORMAT_PREFERENCES = {