]> jfr.im git - yt-dlp.git/blob - yt_dlp/extractor/unsupported.py
[ie/thisav] Remove (#8346)
[yt-dlp.git] / yt_dlp / extractor / unsupported.py
1 from .common import InfoExtractor
2 from ..utils import ExtractorError, classproperty, remove_start
3
4
5 class UnsupportedInfoExtractor(InfoExtractor):
6 IE_DESC = False
7 URLS = () # Redefine in subclasses
8
9 @classproperty
10 def IE_NAME(cls):
11 return remove_start(super().IE_NAME, 'Known')
12
13 @classproperty
14 def _VALID_URL(cls):
15 return rf'https?://(?:www\.)?(?:{"|".join(cls.URLS)})'
16
17
18 LF = '\n '
19
20
21 class KnownDRMIE(UnsupportedInfoExtractor):
22 """Sites that are known to use DRM for all their videos
23
24 Add to this list only if:
25 * You are reasonably certain that the site uses DRM for ALL their videos
26 * Multiple users have asked about this site on github/reddit/discord
27 """
28
29 URLS = (
30 r'play\.hbomax\.com',
31 r'channel(?:4|5)\.com',
32 r'peacocktv\.com',
33 r'(?:[\w\.]+\.)?disneyplus\.com',
34 r'open\.spotify\.com/(?:track|playlist|album|artist)',
35 r'tvnz\.co\.nz',
36 r'oneplus\.ch',
37 r'artstation\.com/learning/courses',
38 r'philo\.com',
39 r'(?:[\w\.]+\.)?mech-plus\.com',
40 r'aha\.video',
41 r'mubi\.com',
42 r'vootkids\.com',
43 r'nowtv\.it/watch',
44 r'tv\.apple\.com',
45 r'primevideo\.com',
46 r'hulu\.com',
47 r'resource\.inkryptvideos\.com',
48 r'joyn\.de',
49 r'amazon\.(?:\w{2}\.)?\w+/gp/video',
50 r'music\.amazon\.(?:\w{2}\.)?\w+',
51 )
52
53 _TESTS = [{
54 # https://github.com/yt-dlp/yt-dlp/issues/4309
55 'url': 'https://peacocktv.com/watch/playback/vod/GMO_00000000073159_01/f9d03003-eb04-3c7f-a7b6-a83ab7eb55bc',
56 'only_matching': True,
57 }, {
58 # https://github.com/yt-dlp/yt-dlp/issues/1719,
59 'url': 'https://www.channel4.com/programmes/gurren-lagann/on-demand/69960-001',
60 'only_matching': True,
61 }, {
62 # https://github.com/yt-dlp/yt-dlp/issues/1548
63 'url': 'https://www.channel5.com/show/uk-s-strongest-man-2021/season-2021/episode-1',
64 'only_matching': True,
65 }, {
66 'url': r'https://hsesn.apps.disneyplus.com',
67 'only_matching': True,
68 }, {
69 'url': r'https://www.disneyplus.com',
70 'only_matching': True,
71 }, {
72 'url': 'https://open.spotify.com/artist/',
73 'only_matching': True,
74 }, {
75 'url': 'https://open.spotify.com/track/',
76 'only_matching': True,
77 }, {
78 # https://github.com/yt-dlp/yt-dlp/issues/4122
79 'url': 'https://www.tvnz.co.nz/shows/ice-airport-alaska/episodes/s1-e1',
80 'only_matching': True,
81 }, {
82 # https://github.com/yt-dlp/yt-dlp/issues/1922
83 'url': 'https://www.oneplus.ch/play/1008188',
84 'only_matching': True,
85 }, {
86 # https://github.com/yt-dlp/yt-dlp/issues/1140
87 'url': 'https://www.artstation.com/learning/courses/dqQ/character-design-masterclass-with-serge-birault/chapters/Rxn3/introduction',
88 'only_matching': True,
89 }, {
90 # https://github.com/yt-dlp/yt-dlp/issues/3544
91 'url': 'https://www.philo.com/player/player/vod/Vk9EOjYwODU0ODg5OTY0ODY0OTQ5NA',
92 'only_matching': True,
93 }, {
94 # https://github.com/yt-dlp/yt-dlp/issues/3533
95 'url': 'https://www.mech-plus.com/player/24892/stream?assetType=episodes&playlist_id=6',
96 'only_matching': True,
97 }, {
98 'url': 'https://watch.mech-plus.com/details/25240?playlist_id=6',
99 'only_matching': True,
100 }, {
101 # https://github.com/yt-dlp/yt-dlp/issues/2934
102 'url': 'https://www.aha.video/player/movie/lucky-man',
103 'only_matching': True,
104 }, {
105 # https://github.com/yt-dlp/yt-dlp/issues/2743
106 'url': 'https://mubi.com/films/the-night-doctor',
107 'only_matching': True,
108 }, {
109 # https://github.com/yt-dlp/yt-dlp/issues/3287
110 'url': 'https://www.vootkids.com/movies/chhota-bheem-the-rise-of-kirmada/764459',
111 'only_matching': True,
112 }, {
113 # https://github.com/yt-dlp/yt-dlp/issues/2744
114 'url': 'https://www.nowtv.it/watch/home/asset/and-just-like-that/skyserie_f8fe979772e8437d8a61ab83b6d293e9/seasons/1/episodes/8/R_126182_HD',
115 'only_matching': True,
116 }, {
117 # https://github.com/yt-dlp/yt-dlp/issues/5557
118 'url': 'https://tv.apple.com/it/show/loot---una-fortuna/umc.cmc.5erbujil1mpazuerhr1udnk45?ctx_brand=tvs.sbd.4000',
119 'only_matching': True,
120 }, {
121 # https://github.com/yt-dlp/yt-dlp/issues/3072
122 'url': 'https://www.joyn.de/play/serien/clannad/1-1-wo-die-kirschblueten-fallen',
123 'only_matching': True,
124 }, {
125 # https://github.com/yt-dlp/yt-dlp/issues/7323
126 'url': 'https://music.amazon.co.jp/albums/B088Y368TK',
127 'only_matching': True,
128 }, {
129 # https://github.com/yt-dlp/yt-dlp/issues/7323
130 'url': 'https://www.amazon.co.jp/gp/video/detail/B09X5HBYRS/',
131 'only_matching': True,
132 }, {
133 # https://github.com/yt-dlp/yt-dlp/issues/6125
134 'url': 'https://www.primevideo.com/region/eu/detail/0H3DDB4KBJFNDCKKLHNRLRLVKQ/ref=atv_br_def_r_br_c_unkc_1_10',
135 'only_matching': True,
136 }, {
137 # https://github.com/yt-dlp/yt-dlp/issues/5740
138 'url': 'https://resource.inkryptvideos.com/v2-a83ns52/iframe/index.html#video_id=7999ea0f6e03439eb40d056258c2d736&otp=xxx',
139 'only_matching': True,
140 }, {
141 # https://github.com/yt-dlp/yt-dlp/issues/5767
142 'url': 'https://www.hulu.com/movie/anthem-6b25fac9-da2b-45a3-8e09-e4156b0471cc',
143 'only_matching': True,
144 }]
145
146 def _real_extract(self, url):
147 raise ExtractorError(
148 f'The requested site is known to use DRM protection. '
149 f'It will {self._downloader._format_err("NOT", self._downloader.Styles.EMPHASIS)} be supported.{LF}'
150 f'Please {self._downloader._format_err("DO NOT", self._downloader.Styles.ERROR)} open an issue, '
151 'unless you have evidence that the video is not DRM protected', expected=True)
152
153
154 class KnownPiracyIE(UnsupportedInfoExtractor):
155 """Sites that have been deemed to be piracy
156
157 In order for this to not end up being a catalog of piracy sites,
158 only sites that were once supported should be added to this list
159 """
160
161 URLS = (
162 r'dood\.(?:to|watch|so|pm|wf|re)',
163 # Sites youtube-dl supports, but we won't
164 r'viewsb\.com',
165 r'filemoon\.sx',
166 r'hentai\.animestigma\.com',
167 r'thisav\.com',
168 )
169
170 _TESTS = [{
171 'url': 'http://dood.to/e/5s1wmbdacezb',
172 'only_matching': True,
173 }, {
174 'url': 'https://thisav.com/en/terms',
175 'only_matching': True,
176 }]
177
178 def _real_extract(self, url):
179 raise ExtractorError(
180 f'This website is no longer supported since it has been determined to be primarily used for piracy.{LF}'
181 f'{self._downloader._format_err("DO NOT", self._downloader.Styles.ERROR)} open issues for it', expected=True)