]> git.bitcoin.ninja Git - youtube-dl/commitdiff
Use _download_webpage in MetacafeIE
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Sat, 20 Apr 2013 09:40:05 +0000 (11:40 +0200)
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Sat, 20 Apr 2013 09:40:05 +0000 (11:40 +0200)
youtube_dl/InfoExtractors.py

index e0a26eb586b6a51606d8e41f5dfd74d0ab754984..5052f3ec8388cc7dda1e5cb224b74f647be04b26 100755 (executable)
@@ -732,12 +732,7 @@ class MetacafeIE(InfoExtractor):
 
         # Retrieve video webpage to extract further information
         request = compat_urllib_request.Request('http://www.metacafe.com/watch/%s/' % video_id)
-        try:
-            self.report_download_webpage(video_id)
-            webpage = compat_urllib_request.urlopen(request).read()
-        except (compat_urllib_error.URLError, compat_http_client.HTTPException, socket.error) as err:
-            self._downloader.report_error(u'unable retrieve video webpage: %s' % compat_str(err))
-            return
+        webpage = self._download_webpage(request, video_id)
 
         # Extract URL, uploader and title from webpage
         self.report_extraction(video_id)