Skip to content

A feature-rich command-line audio/video downloader

[ie/ctv] Remove extractor (#13429)

doe10809f54ea389847
diff --git a/yt_dlp/extractor/_extractors.py b/yt_dlp/extractor/_extractors.py
index 1efc313be2..0d1dc2b045 100644
--- a/yt_dlp/extractor/_extractors.py
+++ b/yt_dlp/extractor/_extractors.py
@@ -446,7 +446,6 @@ from .cspan import (
CSpanIE,
)
from .ctsnews import CtsNewsIE
-from .ctv import CTVIE
from .ctvnews import CTVNewsIE
from .cultureunplugged import CultureUnpluggedIE
from .curiositystream import (
diff --git a/yt_dlp/extractor/ctv.py b/yt_dlp/extractor/ctv.py
deleted file mode 100644
index a41dab11b1..0000000000
--- a/yt_dlp/extractor/ctv.py
+++ /dev/null
@@ -1,49 +0,0 @@
-from .common import InfoExtractor
-
-
-class CTVIE(InfoExtractor):
- _VALID_URL = r'https?://(?:www\.)?ctv\.ca/(?P<id>(?:show|movie)s/[^/]+/[^/?#&]+)'
- _TESTS = [{
- 'url': 'https://www.ctv.ca/shows/your-morning/wednesday-december-23-2020-s5e88',
- 'info_dict': {
- 'id': '2102249',
- 'ext': 'flv',
- 'title': 'Wednesday, December 23, 2020',
- 'thumbnail': r're:^https?://.*\.jpg$',
- 'description': 'Your Morning delivers original perspectives and unique insights into the headlines of the day.',
- 'timestamp': 1608732000,
- 'upload_date': '20201223',
- 'series': 'Your Morning',
- 'season': '2020-2021',
- 'season_number': 5,
- 'episode_number': 88,
- 'tags': ['Your Morning'],
- 'categories': ['Talk Show'],
- 'duration': 7467.126,
- },
- }, {
- 'url': 'https://www.ctv.ca/movies/adam-sandlers-eight-crazy-nights/adam-sandlers-eight-crazy-nights',
- 'only_matching': True,
- }]
-
- def _real_extract(self, url):
- display_id = self._match_id(url)
- content = self._download_json(
- 'https://www.ctv.ca/space-graphql/graphql', display_id, query={
- 'query': '''{
- resolvedPath(path: "/%s") {
- lastSegment {
- content {
- ... on AxisContent {
- axisId
- videoPlayerDestCode
- }
- }
- }
- }
-}''' % display_id, # noqa: UP031
- })['data']['resolvedPath']['lastSegment']['content']
- video_id = content['axisId']
- return self.url_result(
- '9c9media:{}:{}'.format(content['videoPlayerDestCode'], video_id),
- 'NineCNineMedia', video_id)
diff --git a/yt_dlp/extractor/unsupported.py b/yt_dlp/extractor/unsupported.py
index 1b77198100..bd90bc533a 100644
--- a/yt_dlp/extractor/unsupported.py
+++ b/yt_dlp/extractor/unsupported.py
@@ -54,6 +54,7 @@ class KnownDRMIE(UnsupportedInfoExtractor):
r'viki\.com',
r'deezer\.com',
r'b-ch\.com',
+ r'ctv\.ca',
)
_TESTS = [{
@@ -172,6 +173,9 @@ class KnownDRMIE(UnsupportedInfoExtractor):
}, {
'url': 'https://www.b-ch.com/titles/8203/001',
'only_matching': True,
+ }, {
+ 'url': 'https://www.ctv.ca/shows/masterchef-53506/the-audition-battles-s15e1',
+ 'only_matching': True,
}]
def _real_extract(self, url):