]>
Commit | Line | Data |
---|---|---|
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/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 | r'(?:watch|front)\.njpwworld\.com', | |
52 | ) | |
53 | ||
54 | _TESTS = [{ | |
55 | # https://github.com/yt-dlp/yt-dlp/issues/4309 | |
56 | 'url': 'https://peacocktv.com/watch/playback/vod/GMO_00000000073159_01/f9d03003-eb04-3c7f-a7b6-a83ab7eb55bc', | |
57 | 'only_matching': True, | |
58 | }, { | |
59 | # https://github.com/yt-dlp/yt-dlp/issues/1719, | |
60 | 'url': 'https://www.channel4.com/programmes/gurren-lagann/on-demand/69960-001', | |
61 | 'only_matching': True, | |
62 | }, { | |
63 | # https://github.com/yt-dlp/yt-dlp/issues/1548 | |
64 | 'url': 'https://www.channel5.com/show/uk-s-strongest-man-2021/season-2021/episode-1', | |
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 | }, { | |
79 | # https://github.com/yt-dlp/yt-dlp/issues/4122 | |
80 | 'url': 'https://www.tvnz.co.nz/shows/ice-airport-alaska/episodes/s1-e1', | |
81 | 'only_matching': True, | |
82 | }, { | |
83 | # https://github.com/yt-dlp/yt-dlp/issues/1922 | |
84 | 'url': 'https://www.oneplus.ch/play/1008188', | |
85 | 'only_matching': True, | |
86 | }, { | |
87 | # https://github.com/yt-dlp/yt-dlp/issues/1140 | |
88 | 'url': 'https://www.artstation.com/learning/courses/dqQ/character-design-masterclass-with-serge-birault/chapters/Rxn3/introduction', | |
89 | 'only_matching': True, | |
90 | }, { | |
91 | # https://github.com/yt-dlp/yt-dlp/issues/3544 | |
92 | 'url': 'https://www.philo.com/player/player/vod/Vk9EOjYwODU0ODg5OTY0ODY0OTQ5NA', | |
93 | 'only_matching': True, | |
94 | }, { | |
95 | # https://github.com/yt-dlp/yt-dlp/issues/3533 | |
96 | 'url': 'https://www.mech-plus.com/player/24892/stream?assetType=episodes&playlist_id=6', | |
97 | 'only_matching': True, | |
98 | }, { | |
99 | 'url': 'https://watch.mech-plus.com/details/25240?playlist_id=6', | |
100 | 'only_matching': True, | |
101 | }, { | |
102 | # https://github.com/yt-dlp/yt-dlp/issues/2934 | |
103 | 'url': 'https://www.aha.video/player/movie/lucky-man', | |
104 | 'only_matching': True, | |
105 | }, { | |
106 | # https://github.com/yt-dlp/yt-dlp/issues/2743 | |
107 | 'url': 'https://mubi.com/films/the-night-doctor', | |
108 | 'only_matching': True, | |
109 | }, { | |
110 | # https://github.com/yt-dlp/yt-dlp/issues/3287 | |
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', | |
120 | 'only_matching': True, | |
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, | |
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, | |
152 | }] | |
153 | ||
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 | ||
162 | class 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 = ( | |
170 | r'dood\.(?:to|watch|so|pm|wf|re)', | |
171 | # Sites youtube-dl supports, but we won't | |
172 | r'viewsb\.com', | |
173 | r'filemoon\.sx', | |
174 | r'hentai\.animestigma\.com', | |
175 | r'thisav\.com', | |
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', | |
190 | ) | |
191 | ||
192 | _TESTS = [{ | |
193 | 'url': 'http://dood.to/e/5s1wmbdacezb', | |
194 | 'only_matching': True, | |
195 | }, { | |
196 | 'url': 'https://thisav.com/en/terms', | |
197 | 'only_matching': True, | |
198 | }] | |
199 | ||
200 | def _real_extract(self, url): | |
201 | raise ExtractorError( | |
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) |