aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSergey M․ <[email protected]>2015-04-20 22:33:35 +0600
committerSergey M․ <[email protected]>2015-04-20 22:33:35 +0600
commitbda44f31a1e18d71dc1cc7a2a3a754593ecd63d3 (patch)
treee7558ab6069051d938295c54e4d1048d08e40044
parent6621ca39a3f03e44648b54bd8ff57814362f5dbc (diff)
downloadyoutube-dl-bda44f31a1e18d71dc1cc7a2a3a754593ecd63d3.tar.gz
youtube-dl-bda44f31a1e18d71dc1cc7a2a3a754593ecd63d3.zip
[bambuser] Modernize
-rw-r--r--youtube_dl/extractor/bambuser.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/youtube_dl/extractor/bambuser.py b/youtube_dl/extractor/bambuser.py
index c193e66ca..12673e766 100644
--- a/youtube_dl/extractor/bambuser.py
+++ b/youtube_dl/extractor/bambuser.py
@@ -35,12 +35,11 @@ class BambuserIE(InfoExtractor):
}
def _real_extract(self, url):
- mobj = re.match(self._VALID_URL, url)
- video_id = mobj.group('id')
- info_url = ('http://player-c.api.bambuser.com/getVideo.json?'
- '&api_key=%s&vid=%s' % (self._API_KEY, video_id))
- info_json = self._download_webpage(info_url, video_id)
- info = json.loads(info_json)['result']
+ video_id = self._match_id(url)
+
+ info = self._download_json(
+ 'http://player-c.api.bambuser.com/getVideo.json?api_key=%s&vid=%s'
+ % (self._API_KEY, video_id), video_id)['result']
return {
'id': video_id,