]>
Commit | Line | Data |
---|---|---|
d9df9b49 | 1 | from .common import InfoExtractor |
ed6bec16 | 2 | from ..utils import ExtractorError, classproperty, remove_start |
d9df9b49 M |
3 | |
4 | ||
ed6bec16 | 5 | class 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 | ||
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 = ( | |
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', | |
d9df9b49 M |
45 | ) |
46 | ||
47 | _TESTS = [{ | |
48 | # https://github.com/yt-dlp/yt-dlp/issues/4309 | |
84865402 | 49 | 'url': 'https://peacocktv.com/watch/playback/vod/GMO_00000000073159_01/f9d03003-eb04-3c7f-a7b6-a83ab7eb55bc', |
d9df9b49 M |
50 | 'only_matching': True, |
51 | }, { | |
52 | # https://github.com/yt-dlp/yt-dlp/issues/1719, | |
84865402 | 53 | 'url': 'https://www.channel4.com/programmes/gurren-lagann/on-demand/69960-001', |
d9df9b49 M |
54 | 'only_matching': True, |
55 | }, { | |
56 | # https://github.com/yt-dlp/yt-dlp/issues/1548 | |
84865402 | 57 | 'url': 'https://www.channel5.com/show/uk-s-strongest-man-2021/season-2021/episode-1', |
d9df9b49 M |
58 | 'only_matching': True, |
59 | }, { | |
60 | 'url': r'https://hsesn.apps.disneyplus.com', | |
61 | 'only_matching': True, | |
62 | }, { | |
63 | 'url': r'https://www.disneyplus.com', | |
64 | 'only_matching': True, | |
65 | }, { | |
66 | 'url': 'https://open.spotify.com/artist/', | |
67 | 'only_matching': True, | |
68 | }, { | |
69 | 'url': 'https://open.spotify.com/track/', | |
70 | 'only_matching': True, | |
71 | }, { | |
84865402 | 72 | # https://github.com/yt-dlp/yt-dlp/issues/4122 |
73 | 'url': 'https://www.tvnz.co.nz/shows/ice-airport-alaska/episodes/s1-e1', | |
d9df9b49 M |
74 | 'only_matching': True, |
75 | }, { | |
76 | # https://github.com/yt-dlp/yt-dlp/issues/1922 | |
84865402 | 77 | 'url': 'https://www.oneplus.ch/play/1008188', |
d9df9b49 M |
78 | 'only_matching': True, |
79 | }, { | |
80 | # https://github.com/yt-dlp/yt-dlp/issues/1140 | |
84865402 | 81 | 'url': 'https://www.artstation.com/learning/courses/dqQ/character-design-masterclass-with-serge-birault/chapters/Rxn3/introduction', |
d9df9b49 M |
82 | 'only_matching': True, |
83 | }, { | |
84 | # https://github.com/yt-dlp/yt-dlp/issues/3544 | |
84865402 | 85 | 'url': 'https://www.philo.com/player/player/vod/Vk9EOjYwODU0ODg5OTY0ODY0OTQ5NA', |
d9df9b49 M |
86 | 'only_matching': True, |
87 | }, { | |
88 | # https://github.com/yt-dlp/yt-dlp/issues/3533 | |
84865402 | 89 | 'url': 'https://www.mech-plus.com/player/24892/stream?assetType=episodes&playlist_id=6', |
d9df9b49 M |
90 | 'only_matching': True, |
91 | }, { | |
84865402 | 92 | 'url': 'https://watch.mech-plus.com/details/25240?playlist_id=6', |
d9df9b49 M |
93 | 'only_matching': True, |
94 | }, { | |
95 | # https://github.com/yt-dlp/yt-dlp/issues/2934 | |
84865402 | 96 | 'url': 'https://www.aha.video/player/movie/lucky-man', |
d9df9b49 M |
97 | 'only_matching': True, |
98 | }, { | |
99 | # https://github.com/yt-dlp/yt-dlp/issues/2743 | |
84865402 | 100 | 'url': 'https://mubi.com/films/the-night-doctor', |
d9df9b49 M |
101 | 'only_matching': True, |
102 | }, { | |
103 | # https://github.com/yt-dlp/yt-dlp/issues/3287 | |
84865402 | 104 | 'url': 'https://www.vootkids.com/movies/chhota-bheem-the-rise-of-kirmada/764459', |
105 | 'only_matching': True, | |
106 | }, { | |
107 | # https://github.com/yt-dlp/yt-dlp/issues/2744 | |
108 | 'url': 'https://www.nowtv.it/watch/home/asset/and-just-like-that/skyserie_f8fe979772e8437d8a61ab83b6d293e9/seasons/1/episodes/8/R_126182_HD', | |
109 | 'only_matching': True, | |
110 | }, { | |
111 | # https://github.com/yt-dlp/yt-dlp/issues/5557 | |
112 | 'url': 'https://tv.apple.com/it/show/loot---una-fortuna/umc.cmc.5erbujil1mpazuerhr1udnk45?ctx_brand=tvs.sbd.4000', | |
d9df9b49 M |
113 | 'only_matching': True, |
114 | }] | |
115 | ||
ed6bec16 | 116 | def _real_extract(self, url): |
117 | raise ExtractorError( | |
118 | f'The requested site is known to use DRM protection. ' | |
119 | f'It will {self._downloader._format_err("NOT", self._downloader.Styles.EMPHASIS)} be supported.{LF}' | |
120 | f'Please {self._downloader._format_err("DO NOT", self._downloader.Styles.ERROR)} open an issue, ' | |
121 | 'unless you have evidence that the video is not DRM protected', expected=True) | |
122 | ||
123 | ||
124 | class KnownPiracyIE(UnsupportedInfoExtractor): | |
125 | """Sites that have been deemed to be piracy | |
126 | ||
127 | In order for this to not end up being a catalog of piracy sites, | |
128 | only sites that were once supported should be added to this list | |
129 | """ | |
130 | ||
131 | URLS = ( | |
84865402 | 132 | r'dood\.(?:to|watch|so|pm|wf|re)', |
45b2ee6f | 133 | # Sites youtube-dl supports, but we won't |
c8bc203f | 134 | r'viewsb\.com', |
135 | r'filemoon\.sx', | |
136 | r'hentai\.animestigma\.com', | |
ed6bec16 | 137 | ) |
138 | ||
139 | _TESTS = [{ | |
140 | 'url': 'http://dood.to/e/5s1wmbdacezb', | |
141 | 'only_matching': True, | |
142 | }] | |
d9df9b49 M |
143 | |
144 | def _real_extract(self, url): | |
145 | raise ExtractorError( | |
ed6bec16 | 146 | f'This website is no longer supported since it has been determined to be primarily used for piracy.{LF}' |
147 | f'{self._downloader._format_err("DO NOT", self._downloader.Styles.ERROR)} open issues for it', expected=True) |