aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorXie Yanbo <[email protected]>2022-10-30 19:48:44 +0800
committerGitHub <[email protected]>2022-10-30 11:48:44 +0000
commitce5d36486ea95b8961c639d118bad262c8d7a067 (patch)
treed9be58d492e5fbf73d187021cf005bb1d2eac257
parentd25cf62086443d86a633b8176b5c7e79f4cc569e (diff)
downloadyoutube-dl-ce5d36486ea95b8961c639d118bad262c8d7a067.tar.gz
youtube-dl-ce5d36486ea95b8961c639d118bad262c8d7a067.zip
[netease] Support urls shared from mobile app (#31304)
Co-authored-by: dirkf <[email protected]>
-rw-r--r--youtube_dl/extractor/neteasemusic.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/youtube_dl/extractor/neteasemusic.py b/youtube_dl/extractor/neteasemusic.py
index 2bbfc7858..5e5c6271b 100644
--- a/youtube_dl/extractor/neteasemusic.py
+++ b/youtube_dl/extractor/neteasemusic.py
@@ -162,7 +162,7 @@ class NetEaseMusicBaseIE(InfoExtractor):
class NetEaseMusicIE(NetEaseMusicBaseIE):
IE_NAME = 'netease:song'
IE_DESC = '网易云音乐'
- _VALID_URL = r'https?://music\.163\.com/(#/)?song\?id=(?P<id>[0-9]+)'
+ _VALID_URL = r'https?://(y\.)?music\.163\.com/(?:[#m]/)?song\?.*?\bid=(?P<id>[0-9]+)'
_TESTS = [{
'url': 'http://music.163.com/#/song?id=32102397',
'md5': '3e909614ce09b1ccef4a3eb205441190',
@@ -200,6 +200,18 @@ class NetEaseMusicIE(NetEaseMusicBaseIE):
'timestamp': 1264608000,
'alt_title': '说出愿望吧(Genie)',
},
+ }, {
+ 'url': 'https://y.music.163.com/m/song?app_version=8.8.45&id=95670&uct2=sKnvS4+0YStsWkqsPhFijw%3D%3D&dlt=0846',
+ 'md5': '95826c73ea50b1c288b22180ec9e754d',
+ 'info_dict': {
+ 'id': '95670',
+ 'ext': 'mp3',
+ 'title': '国际歌',
+ 'creator': '马备',
+ 'upload_date': '19911130',
+ 'timestamp': 691516800,
+ 'description': 'md5:1ba2f911a2b0aa398479f595224f2141',
+ },
}]
def _process_lyrics(self, lyrics_info):