mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-23 15:51:24 +01:00
Compare commits
4 Commits
7a08f21c70
...
d3a54cf1a6
Author | SHA1 | Date | |
---|---|---|---|
|
d3a54cf1a6 | ||
|
3da3733d06 | ||
|
ceac9f669d | ||
|
e9905f92ec |
|
@ -34,7 +34,6 @@ class NetEaseMusicBaseIE(InfoExtractor):
|
||||||
'sky', # SVIP tier; 沉浸环绕声 (Surround Audio); flac
|
'sky', # SVIP tier; 沉浸环绕声 (Surround Audio); flac
|
||||||
)
|
)
|
||||||
_API_BASE = 'http://music.163.com/api/'
|
_API_BASE = 'http://music.163.com/api/'
|
||||||
_GEO_BYPASS = False
|
|
||||||
|
|
||||||
def _create_eapi_cipher(self, api_path, query_body, cookies):
|
def _create_eapi_cipher(self, api_path, query_body, cookies):
|
||||||
request_text = json.dumps({**query_body, 'header': cookies}, separators=(',', ':'))
|
request_text = json.dumps({**query_body, 'header': cookies}, separators=(',', ':'))
|
||||||
|
@ -64,6 +63,8 @@ class NetEaseMusicBaseIE(InfoExtractor):
|
||||||
'MUSIC_U': ('MUSIC_U', {lambda i: i.value}),
|
'MUSIC_U': ('MUSIC_U', {lambda i: i.value}),
|
||||||
}),
|
}),
|
||||||
}
|
}
|
||||||
|
if self._x_forwarded_for_ip:
|
||||||
|
headers.setdefault('X-Real-IP', self._x_forwarded_for_ip)
|
||||||
return self._download_json(
|
return self._download_json(
|
||||||
urljoin('https://interface3.music.163.com/', f'/eapi{path}'), video_id,
|
urljoin('https://interface3.music.163.com/', f'/eapi{path}'), video_id,
|
||||||
data=self._create_eapi_cipher(f'/api{path}', query_body, cookies), headers={
|
data=self._create_eapi_cipher(f'/api{path}', query_body, cookies), headers={
|
||||||
|
|
Loading…
Reference in New Issue
Block a user