mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-07 19:52:40 +01:00
[dplayit] Relax playback info URL extraction
This commit is contained in:
parent
0cf2352e85
commit
0e7f9a9b48
@ -183,16 +183,15 @@ def _real_extract(self, url):
|
|||||||
|
|
||||||
webpage = self._download_webpage(url, display_id)
|
webpage = self._download_webpage(url, display_id)
|
||||||
|
|
||||||
video_id = self._search_regex(
|
info_url = self._search_regex(
|
||||||
r'url\s*:\s*["\']https://dplay-south-prod\.disco-api\.com/playback/videoPlaybackInfo/(\d+)',
|
r'url\s*:\s*["\']((?:https?:)?//[^/]+/playback/videoPlaybackInfo/\d+)',
|
||||||
webpage, 'video id')
|
webpage, 'video id')
|
||||||
|
|
||||||
title = remove_end(self._og_search_title(webpage), ' | Dplay')
|
title = remove_end(self._og_search_title(webpage), ' | Dplay')
|
||||||
|
|
||||||
try:
|
try:
|
||||||
info = self._download_json(
|
info = self._download_json(
|
||||||
'https://dplay-south-prod.disco-api.com/playback/videoPlaybackInfo/%s' % video_id,
|
info_url, display_id, headers={
|
||||||
display_id, headers={
|
|
||||||
'Authorization': 'Bearer %s' % self._get_cookies(url).get(
|
'Authorization': 'Bearer %s' % self._get_cookies(url).get(
|
||||||
'dplayit_token').value,
|
'dplayit_token').value,
|
||||||
'Referer': url,
|
'Referer': url,
|
||||||
@ -231,7 +230,7 @@ def _real_extract(self, url):
|
|||||||
season_number = episode_number = upload_date = None
|
season_number = episode_number = upload_date = None
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'id': video_id,
|
'id': info_url.rpartition('/')[-1],
|
||||||
'display_id': display_id,
|
'display_id': display_id,
|
||||||
'title': title,
|
'title': title,
|
||||||
'description': self._og_search_description(webpage),
|
'description': self._og_search_description(webpage),
|
||||||
|
Loading…
Reference in New Issue
Block a user