-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
110 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,4 @@ | ||
原来的QQMUsicDownloader,代码重写了,顺便改名叫MusicDownloader,应该会比之前的更加健壮了 | ||
|
||
无损已经凉了,这两天趁着端午看看能不能搞吧 | ||
|
||
|
||
## 功能 ## | ||
|
||
1. 下载QQ音乐**单曲** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#include "vkeyinit2.h" | ||
#include "daye.h" | ||
#include "config.h" | ||
#include <QtDebug> | ||
|
||
vkeyinit2::vkeyinit2(QObject *parent) : QObject(parent) | ||
{ | ||
d=new downloader(); | ||
connect(d,SIGNAL(finished()),this,SLOT(htmlGot())); | ||
connect(d,SIGNAL(downloadError(QString)),this,SLOT(htmlFailed())); | ||
} | ||
|
||
void vkeyinit2::init() | ||
{ | ||
QString htmlLink=QString("https://c.y.qq.com/base/fcgi-bin/fcg_music_express_mobile3.fcg?g_tk=0&loginUin=1008611&hostUin=0&format=json&inCharset=utf8&outCharset=utf-8¬ice=0&platform=yqq&needNewCode=0&cid=205361747&uin=1008611&songmid=003a1tne1nSz1Y&filename=C400003a1tne1nSz1Y.m4a&guid=1234567890"); | ||
d->init(htmlLink,QString(SONGHTMLFILE)); | ||
d->setUserAgent("Dalvik/2.1.0 (Linux; U; Android 5.1.1; vivo x5s l Build/LMY48Z)"); | ||
d->setReferer("https://y.qq.com/portal/profile.html"); | ||
d->doGet(); | ||
} | ||
|
||
void vkeyinit2::htmlFailed() | ||
{ | ||
emit status("无法下载无损歌曲"); | ||
} | ||
|
||
void vkeyinit2::htmlGot() | ||
{ | ||
QString line; | ||
QFile file(SONGHTMLFILE); | ||
int a; | ||
char tmp[200]; | ||
if(file.open(QIODevice::ReadOnly)) | ||
{ | ||
line=file.readLine(); | ||
if(line.contains("vkey")) | ||
{ | ||
a=getStringBetweenAandB(line.toStdString().c_str(),"vkey\":\"","\"",tmp); | ||
if(!a && strlen(tmp)) | ||
{ | ||
vkey2=QString(tmp); | ||
qDebug()<<vkey2; | ||
emit finished(); | ||
} | ||
} | ||
file.close(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#ifndef VKEYINIT2_H | ||
#define VKEYINIT2_H | ||
|
||
#include <QObject> | ||
#include "downloader.h" | ||
|
||
extern QString vkey2; | ||
|
||
class vkeyinit2 : public QObject | ||
{ | ||
Q_OBJECT | ||
public: | ||
explicit vkeyinit2(QObject *parent = nullptr); | ||
void init(); | ||
signals: | ||
void finished(); | ||
void status(QString); | ||
private slots: | ||
void htmlGot(); | ||
void htmlFailed(); | ||
private: | ||
downloader *d; | ||
}; | ||
|
||
#endif // VKEYINIT2_H |