diff options
author | Sergey M․ <dstftw@gmail.com> | 2017-11-09 23:25:43 +0700 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2017-11-09 23:30:25 +0700 |
commit | 61fb07e156671159353ae19a152926cab277ac87 (patch) | |
tree | c7bf4cb61527cb6d410231134bed423a9e8a0855 /youtube_dl/extractor | |
parent | 4222346fb2f42af10ac902cd46469d23923cf114 (diff) |
[pandatv] Modernize (closes #14693)
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r-- | youtube_dl/extractor/pandatv.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/youtube_dl/extractor/pandatv.py b/youtube_dl/extractor/pandatv.py index c99a1bb1f..13a2e7efc 100644 --- a/youtube_dl/extractor/pandatv.py +++ b/youtube_dl/extractor/pandatv.py @@ -6,7 +6,6 @@ from ..utils import ( ExtractorError, qualities, ) -import json class PandaTVIE(InfoExtractor): @@ -67,10 +66,10 @@ class PandaTVIE(InfoExtractor): plflag1 = '4' live_panda = 'live_panda' if plflag0 < 1 else '' - plflag_auth = json.loads(video_info["plflag_list"]) - sign = plflag_auth["auth"]["sign"] - ts = plflag_auth["auth"]["time"] - rid = plflag_auth["auth"]["rid"] + plflag_auth = self._parse_json(video_info['plflag_list'], video_id) + sign = plflag_auth['auth']['sign'] + ts = plflag_auth['auth']['time'] + rid = plflag_auth['auth']['rid'] quality_key = qualities(['OD', 'HD', 'SD']) suffix = ['_small', '_mid', ''] |