0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-22 02:15:12 +00:00

Update outdated API URL

This commit is contained in:
InvalidUsernameException 2024-09-19 21:49:49 +02:00
parent c6a3a9b246
commit 180d2d1a9b

View file

@ -24,6 +24,11 @@ class ZDFBaseIE(InfoExtractor):
_GEO_COUNTRIES = ['DE'] _GEO_COUNTRIES = ['DE']
_QUALITIES = ('auto', 'low', 'med', 'high', 'veryhigh', 'hd', 'fhd', 'uhd') _QUALITIES = ('auto', 'low', 'med', 'high', 'veryhigh', 'hd', 'fhd', 'uhd')
def _download_mediathekv2_document(self, document_id):
return self._download_json(
f'https://zdf-prod-futura.zdf.de/mediathekV2/document/{document_id}',
document_id)
def _call_api(self, url, video_id, item, api_token=None, referrer=None): def _call_api(self, url, video_id, item, api_token=None, referrer=None):
headers = {} headers = {}
if api_token: if api_token:
@ -319,9 +324,7 @@ def _extract_regular(self, url, player, video_id):
return self._extract_entry(player['content'], player, content, video_id) return self._extract_entry(player['content'], player, content, video_id)
def _extract_mobile(self, video_id): def _extract_mobile(self, video_id):
video = self._download_json( video = self._download_mediathekv2_document(video_id)
f'https://zdf-cdn.live.cellular.de/mediathekV2/document/{video_id}',
video_id)
formats = [] formats = []
formitaeten = try_get(video, lambda x: x['document']['formitaeten'], list) formitaeten = try_get(video, lambda x: x['document']['formitaeten'], list)
@ -450,9 +453,7 @@ def _real_extract(self, url):
document_id = self._extract_document_id(webpage) document_id = self._extract_document_id(webpage)
if document_id is not None: if document_id is not None:
data = self._download_json( data = self._download_mediathekv2_document(document_id)
f'https://zdf-prod-futura.zdf.de/mediathekV2/document/{document_id}',
document_id)
for cluster in data['cluster']: for cluster in data['cluster']:
for teaser in cluster['teaser']: for teaser in cluster['teaser']: