aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2017-02-14 01:00:06 +0700
committerSergey M․ <dstftw@gmail.com>2017-02-14 01:00:06 +0700
commit50de3dbad39d0b8cc1529113894f146f6f3f24b9 (patch)
tree17e3547f7a0815fc911783b4ec008d465ac3ea45 /youtube_dl
parent085f169ffebc17ec8b2bfc63aec8f5df57c7bdcf (diff)
[zdf] Fix extraction (closes #12117)
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/extractor/zdf.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/youtube_dl/extractor/zdf.py b/youtube_dl/extractor/zdf.py
index a365923fb..523bb5c95 100644
--- a/youtube_dl/extractor/zdf.py
+++ b/youtube_dl/extractor/zdf.py
@@ -20,9 +20,9 @@ from ..utils import (
class ZDFBaseIE(InfoExtractor):
- def _call_api(self, url, player, referrer, video_id):
+ def _call_api(self, url, player, referrer, video_id, item):
return self._download_json(
- url, video_id, 'Downloading JSON content',
+ url, video_id, 'Downloading JSON %s' % item,
headers={
'Referer': referrer,
'Api-Auth': 'Bearer %s' % player['apiToken'],
@@ -104,7 +104,7 @@ class ZDFIE(ZDFBaseIE):
})
formats.append(f)
- def _extract_entry(self, url, content, video_id):
+ def _extract_entry(self, url, player, content, video_id):
title = content.get('title') or content['teaserHeadline']
t = content['mainVideoContent']['http://zdf.de/rels/target']
@@ -116,7 +116,8 @@ class ZDFIE(ZDFBaseIE):
'http://zdf.de/rels/streams/ptmd-template'].replace(
'{playerId}', 'portal')
- ptmd = self._download_json(urljoin(url, ptmd_path), video_id)
+ ptmd = self._call_api(
+ urljoin(url, ptmd_path), player, url, video_id, 'metadata')
formats = []
track_uris = set()
@@ -174,8 +175,9 @@ class ZDFIE(ZDFBaseIE):
}
def _extract_regular(self, url, player, video_id):
- content = self._call_api(player['content'], player, url, video_id)
- return self._extract_entry(player['content'], content, video_id)
+ content = self._call_api(
+ player['content'], player, url, video_id, 'content')
+ return self._extract_entry(player['content'], player, content, video_id)
def _extract_mobile(self, video_id):
document = self._download_json(