mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-23 09:01:43 +00:00
parent
b58f8d8f2c
commit
4f7a98c565
@ -25,16 +25,21 @@ def _parse_video(self, video):
|
|||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
display_id = self._match_id(url)
|
display_id = self._match_id(url)
|
||||||
component_props = self._parse_json(self._download_json(
|
content = self._download_json(
|
||||||
'https://www.khanacademy.org/api/internal/graphql',
|
'https://www.khanacademy.org/api/internal/graphql/FetchContentData',
|
||||||
display_id, query={
|
display_id, query={
|
||||||
'hash': 1604303425,
|
'fastly_cacheable': 'persist_until_publish',
|
||||||
|
'hash': '4134764944',
|
||||||
|
'lang': 'en',
|
||||||
'variables': json.dumps({
|
'variables': json.dumps({
|
||||||
'path': display_id,
|
'path': display_id,
|
||||||
'queryParams': '',
|
'queryParams': 'lang=en',
|
||||||
|
'isModal': False,
|
||||||
|
'followRedirects': True,
|
||||||
|
'countryCode': 'US',
|
||||||
}),
|
}),
|
||||||
})['data']['contentJson'], display_id)['componentProps']
|
})['data']['contentJson']
|
||||||
return self._parse_component_props(component_props)
|
return self._parse_component_props(self._parse_json(content, display_id)['componentProps'])
|
||||||
|
|
||||||
|
|
||||||
class KhanAcademyIE(KhanAcademyBaseIE):
|
class KhanAcademyIE(KhanAcademyBaseIE):
|
||||||
|
Loading…
Reference in New Issue
Block a user