mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-04-28 19:45:52 +00:00
fix moving method around
This commit is contained in:
parent
f4e4ab0c55
commit
53c12e8202
@ -225,6 +225,17 @@ class PlaySuisseIE(InfoExtractor):
|
|||||||
if not self._ID_TOKEN:
|
if not self._ID_TOKEN:
|
||||||
raise ExtractorError('Login failed')
|
raise ExtractorError('Login failed')
|
||||||
|
|
||||||
|
def _get_media_data(self, media_id, locale):
|
||||||
|
response = self._download_json(
|
||||||
|
'https://www.playsuisse.ch/api/graphql',
|
||||||
|
media_id, data=json.dumps({
|
||||||
|
'operationName': 'AssetWatch',
|
||||||
|
'query': self._GRAPHQL_QUERY,
|
||||||
|
'variables': {'assetId': media_id},
|
||||||
|
}).encode(),
|
||||||
|
headers={'Content-Type': 'application/json', 'locale': locale})
|
||||||
|
return response['data']['assetV2']
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
if not self._ID_TOKEN:
|
if not self._ID_TOKEN:
|
||||||
self.raise_login_required(method='password')
|
self.raise_login_required(method='password')
|
||||||
@ -242,17 +253,6 @@ class PlaySuisseIE(InfoExtractor):
|
|||||||
})
|
})
|
||||||
return info
|
return info
|
||||||
|
|
||||||
def _get_media_data(self, media_id, locale):
|
|
||||||
response = self._download_json(
|
|
||||||
'https://www.playsuisse.ch/api/graphql',
|
|
||||||
media_id, data=json.dumps({
|
|
||||||
'operationName': 'AssetWatch',
|
|
||||||
'query': self._GRAPHQL_QUERY,
|
|
||||||
'variables': {'assetId': media_id},
|
|
||||||
}).encode(),
|
|
||||||
headers={'Content-Type': 'application/json', 'locale': locale})
|
|
||||||
return response['data']['assetV2']
|
|
||||||
|
|
||||||
def _extract_single(self, media_data):
|
def _extract_single(self, media_data):
|
||||||
thumbnails = traverse_obj(media_data, lambda k, _: k.startswith('thumbnail'))
|
thumbnails = traverse_obj(media_data, lambda k, _: k.startswith('thumbnail'))
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user