aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorqbnu <93988953+qbnu@users.noreply.github.com>2024-11-17 19:35:10 +0000
committerGitHub <noreply@github.com>2024-11-17 19:35:10 +0000
commitf9d98509a898737c12977b2e2117277bada2c196 (patch)
tree84a26892336301da2601adf3bcf85dce74ebc8d3
parent37cd7660eaff397c551ee18d80507702342b0c2b (diff)
[ie/ctvnews] Fix playlist ID extraction (#8892)
Authored by: qbnu
-rw-r--r--yt_dlp/extractor/ctvnews.py19
1 files changed, 17 insertions, 2 deletions
diff --git a/yt_dlp/extractor/ctvnews.py b/yt_dlp/extractor/ctvnews.py
index ebed9eb2d..08d76d303 100644
--- a/yt_dlp/extractor/ctvnews.py
+++ b/yt_dlp/extractor/ctvnews.py
@@ -5,10 +5,10 @@ from ..utils import orderedSet
class CTVNewsIE(InfoExtractor):
- _VALID_URL = r'https?://(?:.+?\.)?ctvnews\.ca/(?:video\?(?:clip|playlist|bin)Id=|.*?)(?P<id>[0-9.]+)'
+ _VALID_URL = r'https?://(?:.+?\.)?ctvnews\.ca/(?:video\?(?:clip|playlist|bin)Id=|.*?)(?P<id>[0-9.]+)(?:$|[#?&])'
_TESTS = [{
'url': 'http://www.ctvnews.ca/video?clipId=901995',
- 'md5': '9b8624ba66351a23e0b6e1391971f9af',
+ 'md5': 'b608f466c7fa24b9666c6439d766ab7e',
'info_dict': {
'id': '901995',
'ext': 'flv',
@@ -16,6 +16,14 @@ class CTVNewsIE(InfoExtractor):
'description': 'md5:958dd3b4f5bbbf0ed4d045c790d89285',
'timestamp': 1467286284,
'upload_date': '20160630',
+ 'categories': [],
+ 'tags': [],
+ 'season_id': 57981,
+ 'duration': 764.631,
+ 'series': 'CTV News National story',
+ 'thumbnail': r're:^https?://.*\.jpg$',
+ 'season': 'Season 0',
+ 'season_number': 0,
},
}, {
'url': 'http://www.ctvnews.ca/video?playlistId=1.2966224',
@@ -32,6 +40,13 @@ class CTVNewsIE(InfoExtractor):
},
'playlist_mincount': 100,
}, {
+ 'url': 'https://www.ctvnews.ca/it-s-been-23-years-since-toronto-called-in-the-army-after-a-major-snowstorm-1.5736957',
+ 'info_dict':
+ {
+ 'id': '1.5736957',
+ },
+ 'playlist_mincount': 6,
+ }, {
'url': 'http://www.ctvnews.ca/1.810401',
'only_matching': True,
}, {