Fix metacafe.com code due to recent changes in the site
authorRicardo Garcia <sarbalap+freshmeat@gmail.com>
Sun, 2 Aug 2009 10:18:52 +0000 (12:18 +0200)
committerRicardo Garcia <sarbalap+freshmeat@gmail.com>
Sun, 31 Oct 2010 10:24:43 +0000 (11:24 +0100)
youtube-dl

index 5ca7f2519892d2fdd5f95980e0fa637059312d9f..6d0b32941582fb5d4bf451e4089e578b50545991 100755 (executable)
@@ -821,19 +821,21 @@ class MetacafeIE(InfoExtractor):
 
                # Extract URL, uploader and title from webpage
                self.report_extraction(video_id)
-               mobj = re.search(r'(?m)&mediaURL=(http.*?\.flv)', webpage)
+               mobj = re.search(r'(?m)&mediaURL=([^&]+)', webpage)
                if mobj is None:
                        self._downloader.trouble(u'ERROR: unable to extract media URL')
                        return
                mediaURL = urllib.unquote(mobj.group(1))
 
-               mobj = re.search(r'(?m)&gdaKey=(.*?)&', webpage)
-               if mobj is None:
-                       self._downloader.trouble(u'ERROR: unable to extract gdaKey')
-                       return
-               gdaKey = mobj.group(1)
+               #mobj = re.search(r'(?m)&gdaKey=(.*?)&', webpage)
+               #if mobj is None:
+               #       self._downloader.trouble(u'ERROR: unable to extract gdaKey')
+               #       return
+               #gdaKey = mobj.group(1)
+               #
+               #video_url = '%s?__gda__=%s' % (mediaURL, gdaKey)
 
-               video_url = '%s?__gda__=%s' % (mediaURL, gdaKey)
+               video_url = mediaURL
 
                mobj = re.search(r'(?im)<title>(.*) - Video</title>', webpage)
                if mobj is None: