You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
838 B

  1. from __future__ import unicode_literals
  2. from .common import InfoExtractor
  3. from ..utils import ExtractorError
  4. class CommonMistakesIE(InfoExtractor):
  5. IE_DESC = False # Do not list
  6. _VALID_URL = r'''(?x)
  7. (?:url|URL)
  8. '''
  9. _TESTS = [{
  10. 'url': 'url',
  11. 'only_matching': True,
  12. }, {
  13. 'url': 'URL',
  14. 'only_matching': True,
  15. }]
  16. def _real_extract(self, url):
  17. msg = (
  18. 'You\'ve asked youtube-dl to download the URL "%s". '
  19. 'That doesn\'t make any sense. '
  20. 'Simply remove the parameter in your command or configuration.'
  21. ) % url
  22. if self._downloader.params.get('verbose'):
  23. msg += ' Add -v to the command line to see what arguments and configuration youtube-dl got.'
  24. raise ExtractorError(msg, expected=True)