1
0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-12-23 16:36:48 +00:00

[newstube] Do not shadow standard str

This commit is contained in:
Sergey M․ 2014-05-03 02:30:50 +07:00
parent d664de44b7
commit 3b1dfc0f2f

View File

@ -37,8 +37,8 @@ class NewstubeIE(InfoExtractor):
'http://p.newstube.ru/v2/player.asmx/GetAutoPlayInfo6?state=&url=%s&sessionId=&id=%s&placement=profile&location=n2' % (url, video_guid), 'http://p.newstube.ru/v2/player.asmx/GetAutoPlayInfo6?state=&url=%s&sessionId=&id=%s&placement=profile&location=n2' % (url, video_guid),
video_guid, 'Downloading player XML') video_guid, 'Downloading player XML')
def ns(str): def ns(s):
return str.replace('/', '/%(ns)s') % {'ns': '{http://app1.newstube.ru/N2SiteWS/player.asmx}'} return s.replace('/', '/%(ns)s') % {'ns': '{http://app1.newstube.ru/N2SiteWS/player.asmx}'}
session_id = player.find(ns('./SessionId')).text session_id = player.find(ns('./SessionId')).text
media_info = player.find(ns('./Medias/MediaInfo')) media_info = player.find(ns('./Medias/MediaInfo'))