1 from .common
import InfoExtractor
2 from ..utils
import ExtractorError
5 class CommonMistakesIE(InfoExtractor
):
6 IE_DESC
= False # Do not list
7 _VALID_URL
= r
'(?:url|URL|yt-dlp)$'
11 'only_matching': True,
14 'only_matching': True,
17 def _real_extract(self
, url
):
19 f
'You\'ve asked yt-dlp to download the URL "{url}". '
20 'That doesn\'t make any sense. '
21 'Simply remove the parameter in your command or configuration.'
23 if not self
.get_param('verbose'):
24 msg
+= ' Add -v to the command line to see what arguments and configuration yt-dlp has'
25 raise ExtractorError(msg
, expected
=True)
28 class UnicodeBOMIE(InfoExtractor
):
30 _VALID_URL
= r
'(?P<bom>\ufeff)(?P<id>.*)$'
33 'url': '\ufeffhttp://www.youtube.com/watch?v=BaW_jenozKc',
34 'only_matching': True,
37 def _real_extract(self
, url
):
38 real_url
= self
._match
_id
(url
)
40 'Your URL starts with a Byte Order Mark (BOM). '
41 f
'Removing the BOM and looking for "{real_url}" ...')
42 return self
.url_result(real_url
)
45 class BlobIE(InfoExtractor
):
50 'url': 'blob:https://www.youtube.com/4eb3d090-a761-46e6-8083-c32016a36e3b',
51 'only_matching': True,
54 def _real_extract(self
, url
):
56 'You\'ve asked yt-dlp to download a blob URL. '
57 'A blob URL exists only locally in your browser. '
58 'It is not possible for yt-dlp to access it.', expected
=True)