/[packages]/cauldron/youtube-dl/current/SOURCES/youtube-dl
ViewVC logotype

Diff of /cauldron/youtube-dl/current/SOURCES/youtube-dl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 192810 by kamil, Wed Jan 4 20:06:36 2012 UTC revision 192811 by kamil, Sat Jan 7 01:36:16 2012 UTC
# Line 1  Line 1 
1  #!/usr/bin/env python  #!/usr/bin/env python
2  # -*- coding: utf-8 -*-  # -*- coding: utf-8 -*-
3    
4  __author__  = (  __authors__  = (
5          'Ricardo Garcia Gonzalez',          'Ricardo Garcia Gonzalez',
6          'Danny Colligan',          'Danny Colligan',
7          'Benjamin Johnson',          'Benjamin Johnson',
# Line 18  __author__  = ( Line 18  __author__  = (
18          )          )
19    
20  __license__ = 'Public Domain'  __license__ = 'Public Domain'
21  __version__ = '2011.12.18'  __version__ = '2012.01.05'
22    
23  UPDATE_URL = 'https://raw.github.com/rg3/youtube-dl/master/youtube-dl'  UPDATE_URL = 'https://raw.github.com/rg3/youtube-dl/master/youtube-dl'
24    
# Line 290  def _orderedSet(iterable): Line 290  def _orderedSet(iterable):
290                          res.append(el)                          res.append(el)
291          return res          return res
292    
293    def _unescapeHTML(s):
294        """
295        @param s a string (of type unicode)
296        """
297        assert type(s) == type(u'')
298    
299        htmlParser = HTMLParser.HTMLParser()
300        return htmlParser.unescape(s)
301    
302  class DownloadError(Exception):  class DownloadError(Exception):
303          """Download Error exception.          """Download Error exception.
304    
# Line 1590  class DailymotionIE(InfoExtractor): Line 1599  class DailymotionIE(InfoExtractor):
1599                  self._downloader.to_screen(u'[dailymotion] %s: Extracting information' % video_id)                  self._downloader.to_screen(u'[dailymotion] %s: Extracting information' % video_id)
1600    
1601          def _real_extract(self, url):          def _real_extract(self, url):
                 htmlParser = HTMLParser.HTMLParser()  
                   
1602                  # Extract id and simplified title from URL                  # Extract id and simplified title from URL
1603                  mobj = re.match(self._VALID_URL, url)                  mobj = re.match(self._VALID_URL, url)
1604                  if mobj is None:                  if mobj is None:
# Line 1635  class DailymotionIE(InfoExtractor): Line 1642  class DailymotionIE(InfoExtractor):
1642                  if mobj is None:                  if mobj is None:
1643                          self._downloader.trouble(u'ERROR: unable to extract title')                          self._downloader.trouble(u'ERROR: unable to extract title')
1644                          return                          return
1645                  video_title = htmlParser.unescape(mobj.group('title')).decode('utf-8')                  video_title = _unescapeHTML(mobj.group('title').decode('utf-8'))
1646                  video_title = sanitize_title(video_title)                  video_title = sanitize_title(video_title)
1647                  simple_title = _simplify_title(video_title)                  simple_title = _simplify_title(video_title)
1648    
# Line 3151  class ComedyCentralIE(InfoExtractor): Line 3158  class ComedyCentralIE(InfoExtractor):
3158                                  return                                  return
3159                          epTitle = mobj.group('episode')                          epTitle = mobj.group('episode')
3160    
3161                  mMovieParams = re.findall('<param name="movie" value="(http://media.mtvnservices.com/([^"]*episode.*?:.*?))"/>', html)                  mMovieParams = re.findall('(?:<param name="movie" value="|var url = ")(http://media.mtvnservices.com/([^"]*episode.*?:.*?))"', html)
3162                  if len(mMovieParams) == 0:                  if len(mMovieParams) == 0:
3163                          self._downloader.trouble(u'ERROR: unable to find Flash URL in webpage ' + url)                          self._downloader.trouble(u'ERROR: unable to find Flash URL in webpage ' + url)
3164                          return                          return

Legend:
Removed from v.192810  
changed lines
  Added in v.192811

  ViewVC Help
Powered by ViewVC 1.1.30