Browse Source

[newstube] Do not shadow standard str

totalwebcasting
Sergey M․ 11 years ago
parent
commit
3b1dfc0f2f
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      youtube_dl/extractor/newstube.py

+ 2
- 2
youtube_dl/extractor/newstube.py 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):
return str.replace('/', '/%(ns)s') % {'ns': '{http://app1.newstube.ru/N2SiteWS/player.asmx}'}
def ns(s):
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'))


Loading…
Cancel
Save