1
0
Fork 0
mirror of https://gitlab.com/dstftw/youtube-dl.git synced 2020-11-16 09:42:26 +00:00

[theplatform] Use _download_json

This commit is contained in:
Yen Chi Hsuan 2015-08-20 03:07:04 +08:00
parent 5cdefc4625
commit dd565ac1ad

View file

@ -2,7 +2,6 @@
from __future__ import unicode_literals from __future__ import unicode_literals
import re import re
import json
import time import time
import hmac import hmac
import binascii import binascii
@ -59,8 +58,7 @@ class ThePlatformBaseIE(InfoExtractor):
def get_metadata(self, path, video_id): def get_metadata(self, path, video_id):
info_url = 'http://link.theplatform.com/s/%s?format=preview' % path info_url = 'http://link.theplatform.com/s/%s?format=preview' % path
info_json = self._download_webpage(info_url, video_id) info = self._download_json(info_url, video_id)
info = json.loads(info_json)
subtitles = {} subtitles = {}
captions = info.get('captions') captions = info.get('captions')