Skip to content

Commit

Permalink
fix: 验证码检查可能不生效
Browse files Browse the repository at this point in the history
  • Loading branch information
s12mmm3 committed Dec 15, 2024
1 parent a1b17e9 commit 06ef1ec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion QCloudMusicApi/module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1987,7 +1987,7 @@ QVariantMap Api::login_qr_key(QVariantMap query) {

// 二维码生成接口
QVariantMap Api::login_qr_create(QVariantMap query) {
const QString url = "https://music.163.com/login?codekey=" + query["key"].toString();
const QString url = "http://music.163.com/login?codekey=" + query["key"].toString();
auto result = QVariantMap{
{ "code", 200 },
{ "status", 200 },
Expand Down
5 changes: 3 additions & 2 deletions QCloudMusicApi/util/request.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,9 @@ QVariantMap Request::createRequest(
DEBUG.noquote() << "body" << body;

QString cookie;
for (auto& i : QString(reply->rawHeader("set-cookie")).split("\n")) {
cookie.append(i.replace(QRegularExpression("\\s*Domain=[^;]*"), ""));
auto setCookie = QString(reply->rawHeader("set-cookie"));
for (auto& i : setCookie.split("\n")) {
cookie.append(i.replace(QRegularExpression("\\s*Domain=[^;]*"), "") + ";");
}
answer["cookie"] = cookie;

Expand Down

0 comments on commit 06ef1ec

Please sign in to comment.