fix: Fix the problem of QQ lyrics downloader prompting error.

The reason for this is that the old API has been deprecated.
This commit is contained in:
real-zony 2022-07-25 20:11:30 +08:00
parent 950652c040
commit 0772f5888f
3 changed files with 18 additions and 23 deletions

View File

@ -6,32 +6,26 @@ namespace ZonyLrcTools.Cli.Infrastructure.Lyric.QQMusic.JsonModel
{
public class SongSearchRequest
{
[JsonProperty("remoteplace")] public string RemotePlace { get; set; }
[JsonProperty("format")]
public string Format { get; protected set; }
[JsonProperty("p")] public int Page { get; set; }
[JsonProperty("inCharset")]
public string InCharset { get; protected set; }
[JsonProperty("n")] public int Limit { get; set; }
[JsonProperty("w")] public string Keyword { get; set; }
[JsonProperty("format")] public string ResultFormat { get; set; }
[JsonProperty("inCharset")] public string InCharset { get; set; }
[JsonProperty("outCharset")] public string OutCharset { get; set; }
[JsonProperty("platform")] public string Platform { get; set; }
[JsonProperty("outCharset")]
public string OutCharset { get; protected set; }
[JsonProperty("platform")]
public string Platform { get; protected set; }
[JsonProperty("key")]
public string Keyword { get; protected set; }
protected SongSearchRequest()
{
RemotePlace = "txt.yqq.song";
Page = 1;
Limit = 5;
ResultFormat = "json";
InCharset = "utf8";
OutCharset = "utf8";
Platform = "yqq";
Format = "json";
InCharset = OutCharset = "utf-8";
Platform = "yqq.json";
}
public SongSearchRequest(string musicName, string artistName) : this()

View File

@ -17,11 +17,11 @@ namespace ZonyLrcTools.Cli.Infrastructure.Lyric.QQMusic.JsonModel
public class QQMusicInnerSongModel
{
[JsonProperty("list")] public List<QQMusicInnerSongItem> SongItems { get; set; }
[JsonProperty("itemlist")] public List<QQMusicInnerSongItem> SongItems { get; set; }
}
public class QQMusicInnerSongItem
{
[JsonProperty("songmid")] public string SongId { get; set; }
[JsonProperty("mid")] public string SongId { get; set; }
}
}

View File

@ -17,7 +17,8 @@ namespace ZonyLrcTools.Cli.Infrastructure.Lyric.QQMusic
private readonly IWarpHttpClient _warpHttpClient;
private readonly ILyricItemCollectionFactory _lyricItemCollectionFactory;
private const string QQSearchMusicUrl = @"https://c.y.qq.com/soso/fcgi-bin/client_search_cp";
// private const string QQSearchMusicUrl = @"https://c.y.qq.com/soso/fcgi-bin/client_search_cp";
private const string QQSearchMusicUrl = @"https://c.y.qq.com/splcloud/fcgi-bin/smartbox_new.fcg";
private const string QQGetLyricUrl = @"https://c.y.qq.com/lyric/fcgi-bin/fcg_query_lyric_new.fcg";
private const string QQMusicRequestReferer = @"https://y.qq.com/";