Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

新版歌词接口 #1667

Open
hxj662630 opened this issue Jan 5, 2023 · 26 comments
Open

新版歌词接口 #1667

hxj662630 opened this issue Jan 5, 2023 · 26 comments

Comments

@hxj662630
Copy link

功能描述

  • 目前个人注意到,最新版移动端网易云歌词时间戳几乎已经全部精确到词(目前的移动端歌词界面滚动效果),但同一首歌,pc端调用lyric接口并未返回klyric字段,请问移动端是有新的歌词接口吗,如果是能否麻烦大佬添加?感谢。🤔
@Coloryr
Copy link

Coloryr commented Jan 6, 2023

好像以前是有的,现在没了klyric里面直接是空的
_S1{GC_2)@_7$2_E2J$AQ%U
}{K6C45Z E~IHQ(6Q64@BCR
PC端的歌词是有的,但是API没有
但是某些歌它又有
HT%D(LI0IQA6{VU%CVS1)UY

@Coloryr
Copy link

Coloryr commented Jan 6, 2023

还有的手机有PC无
Screenshot_20230106_135149_com netease cloudmusic
RESVIE1 TSFC83)5J46QU
O878)814G2K8SW`LE%V0Z9B

@hxj662630
Copy link
Author

还有的手机有PC无 Screenshot_20230106_135149_com netease cloudmusic RESVIE1 TSFC83)5J46QU O878)814G2K8SW`LE%V0Z9B

目前移动端好像全部歌词都精确到词了,不知道是不是有相关接口

@kengwang
Copy link
Contributor

kengwang commented Jan 7, 2023

image

已抓到

@kengwang
Copy link
Contributor

kengwang commented Jan 7, 2023

@Binaryify 这边这个新接口不敢直接用来替换旧的接口, 因为其他内容的返回变动很大, 可能造成下游项目不可估量的适配问题, 例如
Lrc 歌词前返回了歌手详情的 JSON (如下图):
image

可能需要单独弄成一个来进行处理

@kengwang
Copy link
Contributor

kengwang commented Jan 7, 2023

先贴出反转义后的逐字歌词, 接下来就是分析参数了:

[20570,1900](20570,360,0)初(20930,150,0)め(21080,120,0)て(21200,170,0)の(21370,60,0)ル(21430,190,0)ー(21620,150,0)ブ(21770,170,0)ル(21940,530,0)は
[22760,2130](22760,210,0)な(22970,160,0)ん(23130,70,0)て(23200,140,0)こ(23340,150,0)と(23490,120,0)は(23610,140,0)な(23750,240,0)か(23990,60,0)っ(24050,350,0)た(24400,490,0)わ
[24920,1650](24920,440,0)私(25360,130,0)だ(25490,140,0)け(25630,140,0)の(25770,140,0)モ(25910,130,0)ナ(26040,160,0)リ(26200,370,0)ザ
[26780,2260](26780,130,0)も(26910,150,0)う(27060,220,0)と(27280,100,0)っ(27380,120,0)く(27500,150,0)に(27650,140,0)出(27790,180,0)会(27970,80,0)っ(28050,110,0)て(28160,170,0)た(28330,250,0)か(28580,460,0)ら
[29180,1710](29180,350,0)初(29530,160,0)め(29690,120,0)て(29810,120,0)あ(29930,130,0)な(30060,170,0)た(30230,90,0)を(30320,240,0)見(30560,330,0)た
[31070,2430](31070,170,0)あ(31240,110,0)の(31350,220,0)日(31570,230,0)動(31800,150,0)き(31950,130,0)出(32080,150,0)し(32230,110,0)た(32340,120,0)歯(32460,1040,0)車
[33500,4280](33500,160,0)止(33660,150,0)め(33810,140,0)ら(33950,130,0)れ(34080,150,0)な(34230,140,0)い(34370,290,0)喪(34660,980,0)失(35640,260,0)の(35900,490,0)予(36390,1390,0)感
[37810,5510](37810,1310,0)も(39120,260,0)う(39380,480,0)い(39860,120,0)っ(39980,250,0)ぱ(40230,280,0)い(40510,530,0)あ(41040,220,0)る(41260,610,0)け(41870,1450,0)ど
[43640,3230](43640,130,0)も(43770,150,0)う(43920,560,0)一(44480,160,0)つ(44640,350,0)増(44990,280,0)や(45270,290,0)し(45560,180,0)ま(45740,180,0)し(45920,180,0)ょ(46100,770,0)う
[46870,4800](46870,1270,0)((48140,160,0)Can (48300,220,0)you (48520,260,0)give (48780,790,0)me (49570,290,0)one (49860,760,0)last (50620,90,0)kiss(50710,960,0)?)
[52230,3400](52230,590,0)忘(52820,240,0)れ(53060,250,0)た(53310,220,0)く(53530,430,0)な(53960,180,0)い(54140,240,0)こ(54380,1250,0)と
[55910,4940](55910,230,0)Oh (56140,940,0)oh (57080,1180,0)oh (58260,480,0)oh (58740,2080,0)oh(60820,30,0)…
[60850,3240](60850,530,0)忘(61380,240,0)れ(61620,240,0)た(61860,200,0)く(62060,450,0)な(62510,170,0)い(62680,230,0)こ(62910,1180,0)と
[64720,4720](64720,400,0)Oh (65120,480,0)oh (65600,2160,0)oh (67760,1210,0)oh (68970,440,0)oh(69410,30,0)…
[69440,2980](69440,300,0)I (69740,290,0)love (70030,180,0)you (70210,160,0)more (70370,530,0)than (70900,140,0)you'll (71040,420,0)ever (71460,960,0)know
[72420,10100](72420,8100,0)「(80520,310,0)写(80830,280,0)真(81110,90,0)は(81200,290,0)苦(81490,120,0)手(81610,160,0)な(81770,170,0)ん(81940,380,0)だ(82320,200,0)」
[82520,2180](82520,110,0)で(82630,150,0)も(82780,210,0)そ(82990,100,0)ん(83090,130,0)な(83220,130,0)も(83350,170,0)の(83520,130,0)は(83650,110,0)い(83760,130,0)ら(83890,200,0)な(84090,300,0)い(84390,310,0)わ
[84830,1740](84830,100,0)あ(84930,170,0)な(85100,150,0)た(85250,70,0)が(85320,180,0)焼(85500,140,0)き(85640,140,0)つ(85780,140,0)い(85920,130,0)た(86050,190,0)ま(86240,330,0)ま
[86830,2240](86830,380,0)私(87210,140,0)の(87350,410,0)心(87760,110,0)の(87870,120,0)プ(87990,140,0)ロ(88130,100,0)ジ(88230,330,0)ェ(88560,120,0)ク(88680,70,0)タ(88750,320,0)ー
[89070,1790](89070,280,0)寂(89350,140,0)し(89490,150,0)く(89640,170,0)な(89810,100,0)い(89910,130,0)ふ(90040,160,0)り(90200,130,0)し(90330,170,0)て(90500,360,0)た
[91040,2240](91040,140,0)ま(91180,140,0)あ(91320,0,0)、(91320,210,0)そ(91530,130,0)ん(91660,140,0)な(91800,140,0)の(91940,90,0)お(92030,260,0)互(92290,140,0)い(92430,530,0)様(92960,320,0)か
[93310,1830](93310,360,0)誰(93670,190,0)か(93860,50,0)を(93910,270,0)求(94180,160,0)め(94340,120,0)る(94460,140,0)こ(94600,180,0)と(94780,360,0)は
[95380,1970](95380,440,0)即(95820,120,0)ち(95940,270,0)傷(96210,90,0)つ(96300,190,0)く(96490,120,0)こ(96610,130,0)と(96740,160,0)だ(96900,130,0)っ(97030,320,0)た
[97800,5890](97800,1630,0)Oh(99430,0,0), (99430,310,0)can (99740,150,0)you (99890,310,0)give (100200,840,0)me (101040,280,0)one (101320,1750,0)last (103070,620,0)kiss(103690,0,0)?
[103690,3290](103690,270,0)燃(103960,310,0)え(104270,240,0)る(104510,80,0)よ(104590,70,0)う(104660,320,0)な(104980,270,0)キ(105250,150,0)ス(105400,130,0)を(105530,350,0)し(105880,60,0)よ(105940,1040,0)う
[107980,4160](107980,480,0)忘(108460,610,0)れ(109070,480,0)た(109550,310,0)く(109860,360,0)て(110220,1920,0)も
[112180,2440](112180,430,0)忘(112610,740,0)れ(113350,160,0)ら(113510,60,0)れ(113570,370,0)な(113940,180,0)い(114120,220,0)ほ(114340,280,0)ど
[114620,6280](114620,60,0)Oh (114680,4070,0)oh (118750,1450,0)oh (120200,230,0)oh (120430,440,0)oh(120870,30,0)…
[120900,2740](120900,250,0)I (121150,310,0)love (121460,170,0)you (121630,330,0)more (121960,410,0)than (122370,140,0)you'll (122510,390,0)ever (122900,740,0)know
[123640,5750](123640,2390,0)Oh (126030,1220,0)oh (127250,520,0)oh (127770,1210,0)oh (128980,380,0)oh(129360,30,0)…
[129420,6910](129420,280,0)I (129700,350,0)love (130050,130,0)you (130180,380,0)more (130560,240,0)than (130800,130,0)you'll (130930,5040,0)ever (135970,360,0)know
[136600,17480](136600,13970,0)も(150570,220,0)う(150790,300,0)分(151090,360,0)か(151450,400,0)っ(151850,470,0)て(152320,430,0)い(152750,560,0)る(153310,770,0)よ
[155110,2460](155110,200,0)こ(155310,280,0)の(155590,370,0)世(155960,250,0)の(156210,280,0)終(156490,300,0)わ(156790,240,0)り(157030,150,0)で(157180,390,0)も
[159360,5210](159360,650,0)年(160010,420,0)を(160430,800,0)と(161230,120,0)っ(161350,680,0)て(162030,2540,0)も
[165720,2200](165720,610,0)忘(166330,280,0)れ(166610,450,0)ら(167060,90,0)れ(167150,380,0)な(167530,40,0)い(167570,350,0)人
[167950,4750](167950,440,0)Oh (168390,1350,0)oh (169740,580,0)oh (170320,1930,0)oh (172250,420,0)oh(172670,30,0)…
[172700,1670](172700,238,0)忘(172938,238,0)れ(173176,238,0)ら(173414,238,0)れ(173652,238,0)な(173890,238,0)い(174128,242,0)人
[174420,5660](174420,2680,0)Oh (177100,360,0)oh (177460,830,0)oh (178290,400,0)oh (178690,1360,0)oh(180050,30,0)…
[180080,5850](180080,950,0)I (181030,440,0)love (181470,160,0)you (181630,300,0)more (181930,310,0)than (182240,270,0)you'll (182510,2910,0)ever (185420,510,0)know
[186050,3540](186050,390,0)Oh (186440,190,0)oh (186630,670,0)oh (187300,60,0)oh (187360,2200,0)oh(189560,30,0)…
[189590,2040](189590,340,0)忘(189930,260,0)れ(190190,300,0)ら(190490,240,0)れ(190730,330,0)な(191060,140,0)い(191200,430,0)人
[196520,18020](196520,220,0)Oh (196740,3350,0)oh (200090,2700,0)oh (202790,4280,0)oh (207070,7440,0)oh(214510,30,0)…
[214540,9260](214540,1157,0)I (215697,1157,0)love (216854,1157,0)you (218011,1157,0)more (219168,1157,0)than (220325,1157,0)you'll (221482,1157,0)ever (222639,1161,0)know
[225910,4240](225910,390,0)吹(226300,190,0)い(226490,90,0)て(226580,450,0)い(227030,120,0)っ(227150,1030,0)た(228180,470,0)風(228650,370,0)の(229020,580,0)後(229600,550,0)を
[230400,4670](230400,250,0)追(230650,150,0)い(230800,220,0)か(231020,400,0)け(231420,950,0)た(232370,450,0)眩(232820,130,0)し(232950,570,0)い(233520,290,0)午(233810,1260,0)後

@kengwang
Copy link
Contributor

kengwang commented Jan 7, 2023

目前的猜测是:
(以下所有时间的单位皆为毫秒)
每一行: 开头的方括号第一个数字为当前行的开始时间, 第二个为持续时间
每一个字, 括号内第一个数字为开始的时间, 第二个为持续时间, 第三个目前观察来看全是 0

@Coloryr
Copy link

Coloryr commented Jan 8, 2023

目前的猜测是: (以下所有时间的单位皆为毫秒) 每一行: 开头的方括号第一个数字为当前行的开始时间, 第二个为持续时间 每一个字, 括号内第一个数字为开始的时间, 第二个为持续时间, 第三个目前观察来看全是 0

感觉还是不对
Screenshot_20230108_161239_com netease cloudmusic
%P%J9XG_5)2} $~3MZ UVDI
是我操作不对吗
A6HYLJ(UI}FHD$C7X(RNJII

@Coloryr
Copy link

Coloryr commented Jan 8, 2023

@kengwang
Copy link
Contributor

kengwang commented Jan 8, 2023

image

我猜是这一坨

@Coloryr
Copy link

Coloryr commented Jan 8, 2023

image

我猜是这一坨

绝,懂了
得了,真的奇葩

Coloryr added a commit to Coloryr/AllMusic_Server that referenced this issue Jan 8, 2023
@Coloryr
Copy link

Coloryr commented Jan 8, 2023

目前的猜测是: (以下所有时间的单位皆为毫秒) 每一行: 开头的方括号第一个数字为当前行的开始时间, 第二个为持续时间 每一个字, 括号内第一个数字为开始的时间, 第二个为持续时间, 第三个目前观察来看全是 0

yrc有n个版本,要一一解析

@kengwang
Copy link
Contributor

kengwang commented Jan 8, 2023

Reply: #1667 (comment)

能否提供具体的例子, 我目前就只看到这一个
请注意, 这个返回的 version 代表当前歌词为经过用户修订后的第几个版本

@Coloryr
Copy link

Coloryr commented Jan 8, 2023

Reply: #1667 (comment)

能否提供具体的例子, 我目前就只看到这一个 请注意, 这个返回的 version 代表当前歌词为经过用户修订后的第几个版本

我在搞,稍等

@Coloryr
Copy link

Coloryr commented Jan 8, 2023

Reply: #1667 (comment)

能否提供具体的例子, 我目前就只看到这一个 请注意, 这个返回的 version 代表当前歌词为经过用户修订后的第几个版本

我懂了yrcklyric是两个结构

@hxj662630
Copy link
Author

Reply: #1667 (comment)

能否提供具体的例子, 我目前就只看到这一个 请注意, 这个返回的 version 代表当前歌词为经过用户修订后的第几个版本

最新版,好像报404,大佬😢
屏幕截图 2023-01-10 202347

@Binaryify
Copy link
Owner

@hxj662630 拉代码后要重启服务

@hxj662630
Copy link
Author

@hxj662630 拉代码后要重启服务

vercel上重新部署了,但还是报这个错😂

@Binaryify
Copy link
Owner

@hxj662630 应该是文档错了,地址得是 /lyric/new

Binaryify added a commit that referenced this issue Jan 11, 2023
@hxj662630
Copy link
Author

@hxj662630 应该是文档错了,地址得是 /lyric/new

是的,刚去看了server源码,里面把_转换成/了😂

@xwzkj
Copy link

xwzkj commented May 10, 2023

大佬 ,绝大部分音乐pc端可以显示逐字歌词,但是新版api和旧版都无法获取
官方客户端↓
image
新版↓
image
旧版↓
image

@xwzkj
Copy link

xwzkj commented May 10, 2023

image
尝试抓了下包,能抓到形如yrc的数据,但是是加密的
post请求
https://interface.music.163.com/eapi/song/lyric

@kengwang
Copy link
Contributor

image 尝试抓了下包,能抓到形如yrc的数据,但是是加密的 post请求 https://interface.music.163.com/eapi/song/lyric

请使用本程序进行解密请求

@q962
Copy link

q962 commented Jun 12, 2023

所能解释一下字段的含义?
逐字歌词是通过 lrc/klyric/tlyric/yrc 区分的吗?

存在多种格式的逐字歌词
lrc -- 标准 lrc 歌词

klyric -- 音译歌词

  • [236082,270000](0,250)no(0,350)也(0,250)塔

tlyric -- 中文翻译歌词

romalrc -- ??

yrc -- 逐字歌词

  • [12580,3470](12580,250,0)难(12830,300,0)以(13130,370,0)忘

字段中的 version 的意义是什么?

还是说,需要应用程序兼容所有版本?

@kengwang
Copy link
Contributor

Re: #1667 (comment)

romalrc 为音译歌词 (例如罗马字<romaji>)

version 在前面已经提及, 推测代表歌词目前的顺序版本, 与解析无关

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants