aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/dplay.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2017-03-08 21:30:30 +0700
committerSergey M․ <dstftw@gmail.com>2017-03-08 21:30:30 +0700
commit0e7f9a9b48700efd40c4068b00364a7963dc9265 (patch)
tree71aaec01365f15eaba137d6c5041dde66e227e4f /youtube_dl/extractor/dplay.py
parent0cf2352e858982ed811122cf867fb5e25694d97a (diff)
[dplayit] Relax playback info URL extraction
Diffstat (limited to 'youtube_dl/extractor/dplay.py')
-rw-r--r--youtube_dl/extractor/dplay.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/youtube_dl/extractor/dplay.py b/youtube_dl/extractor/dplay.py
index 62e676389..87c5dd63e 100644
--- a/youtube_dl/extractor/dplay.py
+++ b/youtube_dl/extractor/dplay.py
@@ -183,16 +183,15 @@ class DPlayItIE(InfoExtractor):
webpage = self._download_webpage(url, display_id)
- video_id = self._search_regex(
- r'url\s*:\s*["\']https://dplay-south-prod\.disco-api\.com/playback/videoPlaybackInfo/(\d+)',
+ info_url = self._search_regex(
+ r'url\s*:\s*["\']((?:https?:)?//[^/]+/playback/videoPlaybackInfo/\d+)',
webpage, 'video id')
title = remove_end(self._og_search_title(webpage), ' | Dplay')
try:
info = self._download_json(
- 'https://dplay-south-prod.disco-api.com/playback/videoPlaybackInfo/%s' % video_id,
- display_id, headers={
+ info_url, display_id, headers={
'Authorization': 'Bearer %s' % self._get_cookies(url).get(
'dplayit_token').value,
'Referer': url,
@@ -231,7 +230,7 @@ class DPlayItIE(InfoExtractor):
season_number = episode_number = upload_date = None
return {
- 'id': video_id,
+ 'id': info_url.rpartition('/')[-1],
'display_id': display_id,
'title': title,
'description': self._og_search_description(webpage),