[myvideo] Use RTMP instead of RTMPT (Fixes #2032)
authorPhilipp Hagemeister <phihag@phihag.de>
Mon, 23 Dec 2013 14:57:43 +0000 (15:57 +0100)
committerPhilipp Hagemeister <phihag@phihag.de>
Mon, 23 Dec 2013 14:57:43 +0000 (15:57 +0100)
youtube_dl/extractor/common.py
youtube_dl/extractor/myvideo.py

index 9d39c632aa2602ff91944eaf2dc03ba8fe06148a..0dd50444456351b9753c3d08e69e0f24616e91cd 100644 (file)
@@ -242,6 +242,11 @@ class InfoExtractor(object):
             xml_string = transform_source(xml_string)
         return xml.etree.ElementTree.fromstring(xml_string.encode('utf-8'))
 
+    def report_warning(self, msg, video_id=None):
+        idstr = u'' if video_id is None else u'%s: ' % video_id
+        self._downloader.report_warning(
+            u'[%s] %s%s' % (self.IE_NAME, idstr, msg))
+
     def to_screen(self, msg):
         """Print msg to screen, prefixing it with '[ie_name]'"""
         self._downloader.to_screen(u'[%s] %s' % (self.IE_NAME, msg))
index 0404e6e43f381c86f8bb91633ca5524564009957..6d35c7861f38f844385454fb7e7d9e8d5ff029a9 100644 (file)
@@ -143,8 +143,10 @@ class MyVideoIE(InfoExtractor):
         if mobj:
             video_url = compat_urllib_parse.unquote(mobj.group(1))
             if 'myvideo2flash' in video_url:
-                self._downloader.report_warning(u'forcing RTMPT ...')
-                video_url = video_url.replace('rtmpe://', 'rtmpt://')
+                self.report_warning(
+                    u'Rewriting URL to use unencrypted rtmp:// ...',
+                    video_id)
+                video_url = video_url.replace('rtmpe://', 'rtmp://')
 
         if not video_url:
             # extract non rtmp videos