]> jfr.im git - yt-dlp.git/blame - yt_dlp/extractor/unsupported.py
[ie/youtube] Suppress "Unavailable videos are hidden" warning (#10159)
[yt-dlp.git] / yt_dlp / extractor / unsupported.py
CommitLineData
d9df9b49 1from .common import InfoExtractor
ed6bec16 2from ..utils import ExtractorError, classproperty, remove_start
d9df9b49
M
3
4
ed6bec16 5class UnsupportedInfoExtractor(InfoExtractor):
d9df9b49 6 IE_DESC = False
ed6bec16 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
18LF = '\n '
19
20
21class 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
47ab66db 26 * Multiple users have asked about this site on github/discord
ed6bec16 27 """
28
29 URLS = (
d9df9b49
M
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',
84865402 42 r'vootkids\.com',
43 r'nowtv\.it/watch',
44 r'tv\.apple\.com',
e7057383 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+',
e569c2d1 51 r'(?:watch|front)\.njpwworld\.com',
d9df9b49
M
52 )
53
54 _TESTS = [{
55 # https://github.com/yt-dlp/yt-dlp/issues/4309
84865402 56 'url': 'https://peacocktv.com/watch/playback/vod/GMO_00000000073159_01/f9d03003-eb04-3c7f-a7b6-a83ab7eb55bc',
d9df9b49
M
57 'only_matching': True,
58 }, {
59 # https://github.com/yt-dlp/yt-dlp/issues/1719,
84865402 60 'url': 'https://www.channel4.com/programmes/gurren-lagann/on-demand/69960-001',
d9df9b49
M
61 'only_matching': True,
62 }, {
63 # https://github.com/yt-dlp/yt-dlp/issues/1548
84865402 64 'url': 'https://www.channel5.com/show/uk-s-strongest-man-2021/season-2021/episode-1',
d9df9b49
M
65 'only_matching': True,
66 }, {
67 'url': r'https://hsesn.apps.disneyplus.com',
68 'only_matching': True,
69 }, {
70 'url': r'https://www.disneyplus.com',
71 'only_matching': True,
72 }, {
73 'url': 'https://open.spotify.com/artist/',
74 'only_matching': True,
75 }, {
76 'url': 'https://open.spotify.com/track/',
77 'only_matching': True,
78 }, {
84865402 79 # https://github.com/yt-dlp/yt-dlp/issues/4122
80 'url': 'https://www.tvnz.co.nz/shows/ice-airport-alaska/episodes/s1-e1',
d9df9b49
M
81 'only_matching': True,
82 }, {
83 # https://github.com/yt-dlp/yt-dlp/issues/1922
84865402 84 'url': 'https://www.oneplus.ch/play/1008188',
d9df9b49
M
85 'only_matching': True,
86 }, {
87 # https://github.com/yt-dlp/yt-dlp/issues/1140
84865402 88 'url': 'https://www.artstation.com/learning/courses/dqQ/character-design-masterclass-with-serge-birault/chapters/Rxn3/introduction',
d9df9b49
M
89 'only_matching': True,
90 }, {
91 # https://github.com/yt-dlp/yt-dlp/issues/3544
84865402 92 'url': 'https://www.philo.com/player/player/vod/Vk9EOjYwODU0ODg5OTY0ODY0OTQ5NA',
d9df9b49
M
93 'only_matching': True,
94 }, {
95 # https://github.com/yt-dlp/yt-dlp/issues/3533
84865402 96 'url': 'https://www.mech-plus.com/player/24892/stream?assetType=episodes&playlist_id=6',
d9df9b49
M
97 'only_matching': True,
98 }, {
84865402 99 'url': 'https://watch.mech-plus.com/details/25240?playlist_id=6',
d9df9b49
M
100 'only_matching': True,
101 }, {
102 # https://github.com/yt-dlp/yt-dlp/issues/2934
84865402 103 'url': 'https://www.aha.video/player/movie/lucky-man',
d9df9b49
M
104 'only_matching': True,
105 }, {
106 # https://github.com/yt-dlp/yt-dlp/issues/2743
84865402 107 'url': 'https://mubi.com/films/the-night-doctor',
d9df9b49
M
108 'only_matching': True,
109 }, {
110 # https://github.com/yt-dlp/yt-dlp/issues/3287
84865402 111 'url': 'https://www.vootkids.com/movies/chhota-bheem-the-rise-of-kirmada/764459',
112 'only_matching': True,
113 }, {
114 # https://github.com/yt-dlp/yt-dlp/issues/2744
115 'url': 'https://www.nowtv.it/watch/home/asset/and-just-like-that/skyserie_f8fe979772e8437d8a61ab83b6d293e9/seasons/1/episodes/8/R_126182_HD',
116 'only_matching': True,
117 }, {
118 # https://github.com/yt-dlp/yt-dlp/issues/5557
119 'url': 'https://tv.apple.com/it/show/loot---una-fortuna/umc.cmc.5erbujil1mpazuerhr1udnk45?ctx_brand=tvs.sbd.4000',
d9df9b49 120 'only_matching': True,
e7057383 121 }, {
122 # https://github.com/yt-dlp/yt-dlp/issues/3072
123 'url': 'https://www.joyn.de/play/serien/clannad/1-1-wo-die-kirschblueten-fallen',
124 'only_matching': True,
125 }, {
126 # https://github.com/yt-dlp/yt-dlp/issues/7323
127 'url': 'https://music.amazon.co.jp/albums/B088Y368TK',
128 'only_matching': True,
129 }, {
130 # https://github.com/yt-dlp/yt-dlp/issues/7323
131 'url': 'https://www.amazon.co.jp/gp/video/detail/B09X5HBYRS/',
132 'only_matching': True,
133 }, {
134 # https://github.com/yt-dlp/yt-dlp/issues/6125
135 'url': 'https://www.primevideo.com/region/eu/detail/0H3DDB4KBJFNDCKKLHNRLRLVKQ/ref=atv_br_def_r_br_c_unkc_1_10',
136 'only_matching': True,
137 }, {
138 # https://github.com/yt-dlp/yt-dlp/issues/5740
139 'url': 'https://resource.inkryptvideos.com/v2-a83ns52/iframe/index.html#video_id=7999ea0f6e03439eb40d056258c2d736&otp=xxx',
140 'only_matching': True,
141 }, {
142 # https://github.com/yt-dlp/yt-dlp/issues/5767
143 'url': 'https://www.hulu.com/movie/anthem-6b25fac9-da2b-45a3-8e09-e4156b0471cc',
144 'only_matching': True,
e569c2d1 145 }, {
146 # https://github.com/yt-dlp/yt-dlp/pull/8570
147 'url': 'https://watch.njpwworld.com/player/36447/series?assetType=series',
148 'only_matching': True,
149 }, {
150 'url': 'https://front.njpwworld.com/p/s_series_00563_16_bs',
151 'only_matching': True,
d9df9b49
M
152 }]
153
ed6bec16 154 def _real_extract(self, url):
155 raise ExtractorError(
156 f'The requested site is known to use DRM protection. '
157 f'It will {self._downloader._format_err("NOT", self._downloader.Styles.EMPHASIS)} be supported.{LF}'
158 f'Please {self._downloader._format_err("DO NOT", self._downloader.Styles.ERROR)} open an issue, '
159 'unless you have evidence that the video is not DRM protected', expected=True)
160
161
162class KnownPiracyIE(UnsupportedInfoExtractor):
163 """Sites that have been deemed to be piracy
164
165 In order for this to not end up being a catalog of piracy sites,
166 only sites that were once supported should be added to this list
167 """
168
169 URLS = (
84865402 170 r'dood\.(?:to|watch|so|pm|wf|re)',
45b2ee6f 171 # Sites youtube-dl supports, but we won't
c8bc203f 172 r'viewsb\.com',
173 r'filemoon\.sx',
174 r'hentai\.animestigma\.com',
cb480e39 175 r'thisav\.com',
01395a34 176 r'gounlimited\.to',
177 r'highstream\.tv',
178 r'uqload\.com',
179 r'vedbam\.xyz',
180 r'vadbam\.net'
181 r'vidlo\.us',
182 r'wolfstream\.tv',
183 r'xvideosharing\.com',
184 r'(?:\w+\.)?viidshar\.com',
185 r'sxyprn\.com',
186 r'jable\.tv',
187 r'91porn\.com',
188 r'einthusan\.(?:tv|com|ca)',
189 r'yourupload\.com',
ed6bec16 190 )
191
192 _TESTS = [{
193 'url': 'http://dood.to/e/5s1wmbdacezb',
194 'only_matching': True,
cb480e39 195 }, {
196 'url': 'https://thisav.com/en/terms',
197 'only_matching': True,
ed6bec16 198 }]
d9df9b49
M
199
200 def _real_extract(self, url):
201 raise ExtractorError(
ed6bec16 202 f'This website is no longer supported since it has been determined to be primarily used for piracy.{LF}'
203 f'{self._downloader._format_err("DO NOT", self._downloader.Styles.ERROR)} open issues for it', expected=True)