]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/commonmistakes.py
   1 from __future__ 
import unicode_literals
 
   3 from .common 
import InfoExtractor
 
   4 from ..utils 
import ExtractorError
 
   7 class CommonMistakesIE(InfoExtractor
): 
   8     IE_DESC 
= False  # Do not list 
  15         'only_matching': True, 
  18         'only_matching': True, 
  21     def _real_extract(self
, url
): 
  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.' 
  27         if not 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) 
  32 class UnicodeBOMIE(InfoExtractor
): 
  34         _VALID_URL 
= r
'(?P<bom>\ufeff)(?P<id>.*)$' 
  37             'url': '\ufeffhttp://www.youtube.com/watch?v=BaW_jenozKc', 
  38             'only_matching': True, 
  41         def _real_extract(self
, url
): 
  42             real_url 
= self
._match
_id
(url
) 
  44                 'Your URL starts with a Byte Order Mark (BOM). ' 
  45                 'Removing the BOM and looking for "%s" ...' % real_url
) 
  46             return self
.url_result(real_url
)