unsupported.py 5.3 KB

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