unsupported.py 7.5 KB

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