1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-26 12:11:52 +00:00

[myvideo] Use RTMP instead of RTMPT (Fixes #2032)

This commit is contained in:
Philipp Hagemeister 2013-12-23 15:57:43 +01:00
parent 1538eff6d8
commit f45f96f8f8
2 changed files with 9 additions and 2 deletions

View file

@ -242,6 +242,11 @@ class InfoExtractor(object):
xml_string = transform_source(xml_string) xml_string = transform_source(xml_string)
return xml.etree.ElementTree.fromstring(xml_string.encode('utf-8')) 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): def to_screen(self, msg):
"""Print msg to screen, prefixing it with '[ie_name]'""" """Print msg to screen, prefixing it with '[ie_name]'"""
self._downloader.to_screen(u'[%s] %s' % (self.IE_NAME, msg)) self._downloader.to_screen(u'[%s] %s' % (self.IE_NAME, msg))

View file

@ -143,8 +143,10 @@ class MyVideoIE(InfoExtractor):
if mobj: if mobj:
video_url = compat_urllib_parse.unquote(mobj.group(1)) video_url = compat_urllib_parse.unquote(mobj.group(1))
if 'myvideo2flash' in video_url: if 'myvideo2flash' in video_url:
self._downloader.report_warning(u'forcing RTMPT ...') self.report_warning(
video_url = video_url.replace('rtmpe://', 'rtmpt://') u'Rewriting URL to use unencrypted rtmp:// ...',
video_id)
video_url = video_url.replace('rtmpe://', 'rtmp://')
if not video_url: if not video_url:
# extract non rtmp videos # extract non rtmp videos