]> Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/commonmistakes.py
debian/control: Add recommends on aria2 | wget | curl to use external downloaders.
[youtubedl] / youtube_dl / extractor / commonmistakes.py
1 from __future__ import unicode_literals
2
3 from .common import InfoExtractor
4 from ..utils import ExtractorError
5
6
7 class CommonMistakesIE(InfoExtractor):
8 IE_DESC = False # Do not list
9 _VALID_URL = r'''(?x)
10 (?:url|URL)
11 '''
12
13 _TESTS = [{
14 'url': 'url',
15 'only_matching': True,
16 }, {
17 'url': 'URL',
18 'only_matching': True,
19 }]
20
21 def _real_extract(self, url):
22 msg = (
23 'You\'ve asked youtube-dl to download the URL "%s". '
24 'That doesn\'t make any sense. '
25 'Simply remove the parameter in your command or configuration.'
26 ) % url
27 if self._downloader.params.get('verbose'):
28 msg += ' Add -v to the command line to see what arguments and configuration youtube-dl got.'
29 raise ExtractorError(msg, expected=True)