1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-09-03 08:35:32 +00:00

[extractor/doodstream] Remove extractor

It was added in youtube-dlc, likely without sufficient scrutiny

Closes #3808, Closes #5251, Closes #5403
This commit is contained in:
pukkandan
2022-11-09 15:48:25 +05:30
parent 0d8affc17f
commit ed6bec168d
3 changed files with 51 additions and 89 deletions

View File

@ -1,11 +1,32 @@
from .common import InfoExtractor
from ..utils import classproperty, ExtractorError
from ..utils import ExtractorError, classproperty, remove_start
class KnownDRMIE(InfoExtractor):
class UnsupportedInfoExtractor(InfoExtractor):
IE_DESC = False
IE_NAME = 'unsupported:drm'
UNSUPPORTED_URLS = (
URLS = () # Redefine in subclasses
@classproperty
def IE_NAME(cls):
return remove_start(super().IE_NAME, 'Known')
@classproperty
def _VALID_URL(cls):
return rf'https?://(?:www\.)?(?:{"|".join(cls.URLS)})'
LF = '\n '
class KnownDRMIE(UnsupportedInfoExtractor):
"""Sites that are known to use DRM for all their videos
Add to this list only if:
* You are reasonably certain that the site uses DRM for ALL their videos
* Multiple users have asked about this site on github/reddit/discord
"""
URLS = (
r'play\.hbomax\.com',
r'channel(?:4|5)\.com',
r'peacocktv\.com',
@ -82,12 +103,31 @@ class KnownDRMIE(InfoExtractor):
'only_matching': True,
}]
@classproperty
def _VALID_URL(cls):
return rf'https?://(?:www\.)?(?:{"|".join(cls.UNSUPPORTED_URLS)})'
def _real_extract(self, url):
raise ExtractorError(
f'The requested site is known to use DRM protection. '
f'It will {self._downloader._format_err("NOT", self._downloader.Styles.EMPHASIS)} be supported.{LF}'
f'Please {self._downloader._format_err("DO NOT", self._downloader.Styles.ERROR)} open an issue, '
'unless you have evidence that the video is not DRM protected', expected=True)
class KnownPiracyIE(UnsupportedInfoExtractor):
"""Sites that have been deemed to be piracy
In order for this to not end up being a catalog of piracy sites,
only sites that were once supported should be added to this list
"""
URLS = (
r'dood\.(?:to|watch|so|pm|wf|ru)',
)
_TESTS = [{
'url': 'http://dood.to/e/5s1wmbdacezb',
'only_matching': True,
}]
def _real_extract(self, url):
raise ExtractorError(
f'The requested site is known to use DRM protection. It will {self._downloader._format_err("NOT", self._downloader.Styles.EMPHASIS)} be supported by yt-dlp. '
f'Please {self._downloader._format_err("DO NOT", self._downloader.Styles.ERROR)} open an issue, unless you have evidence that it is not DRM protected.',
expected=True)
f'This website is no longer supported since it has been determined to be primarily used for piracy.{LF}'
f'{self._downloader._format_err("DO NOT", self._downloader.Styles.ERROR)} open issues for it', expected=True)