Browse Source

[theplatform] Use _download_json

master
Yen Chi Hsuan 9 years ago
parent
commit
dd565ac1ad
1 changed files with 1 additions and 3 deletions
  1. 4
      youtube_dl/extractor/theplatform.py

4
youtube_dl/extractor/theplatform.py

@ -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 = json.loads(info_json)
info = self._download_json(info_url, video_id)
subtitles = {} subtitles = {}
captions = info.get('captions') captions = info.get('captions')

Loading…
Cancel
Save