2023年4月23日15:45:58 音乐搜所
parent
492ef987b1
commit
c3e9b30846
5
pom.xml
5
pom.xml
|
|
@ -394,6 +394,11 @@
|
||||||
<version>5.3.25</version>
|
<version>5.3.25</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.bouncycastle</groupId>
|
||||||
|
<artifactId>bcprov-jdk16</artifactId>
|
||||||
|
<version>1.46</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ package com.zhangmeng.tools.controller;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.io.FileUtil;
|
import cn.hutool.core.io.FileUtil;
|
||||||
|
import cn.hutool.core.lang.UUID;
|
||||||
import cn.hutool.http.Header;
|
import cn.hutool.http.Header;
|
||||||
import cn.hutool.http.HttpRequest;
|
import cn.hutool.http.HttpRequest;
|
||||||
import cn.hutool.http.HttpUtil;
|
import cn.hutool.http.HttpUtil;
|
||||||
|
|
@ -13,12 +14,17 @@ import com.zhangmeng.tools.music.kugou.KuGouMusic;
|
||||||
import com.zhangmeng.tools.music.kuwo.DownLoadInfo;
|
import com.zhangmeng.tools.music.kuwo.DownLoadInfo;
|
||||||
import com.zhangmeng.tools.music.kuwo.DownLoadURL;
|
import com.zhangmeng.tools.music.kuwo.DownLoadURL;
|
||||||
import com.zhangmeng.tools.music.kuwo.SearchByKey;
|
import com.zhangmeng.tools.music.kuwo.SearchByKey;
|
||||||
|
import com.zhangmeng.tools.music.migu.MiGuMusic;
|
||||||
|
import com.zhangmeng.tools.music.migu.SwitchType;
|
||||||
|
import com.zhangmeng.tools.music.qianqian.QianQianMusic;
|
||||||
import com.zhangmeng.tools.music.qq.QQMusic;
|
import com.zhangmeng.tools.music.qq.QQMusic;
|
||||||
import com.zhangmeng.tools.music.qq.QqEncrypt;
|
import com.zhangmeng.tools.music.qq.QqEncrypt;
|
||||||
import com.zhangmeng.tools.music.qq.QqQuery;
|
import com.zhangmeng.tools.music.qq.QqQuery;
|
||||||
import com.zhangmeng.tools.music.wangyiyun.Song;
|
import com.zhangmeng.tools.music.wangyiyun.Song;
|
||||||
import com.zhangmeng.tools.music.wangyiyun.WangYiYunMusic;
|
import com.zhangmeng.tools.music.wangyiyun.WangYiYunMusic;
|
||||||
import com.zhangmeng.tools.utils.AlertUtils;
|
import com.zhangmeng.tools.utils.AlertUtils;
|
||||||
|
import com.zhangmeng.tools.utils.EncryptUtils;
|
||||||
|
import io.netty.util.internal.StringUtil;
|
||||||
import javafx.beans.property.SimpleIntegerProperty;
|
import javafx.beans.property.SimpleIntegerProperty;
|
||||||
import javafx.beans.property.SimpleObjectProperty;
|
import javafx.beans.property.SimpleObjectProperty;
|
||||||
import javafx.beans.value.ChangeListener;
|
import javafx.beans.value.ChangeListener;
|
||||||
|
|
@ -29,29 +35,32 @@ import javafx.fxml.FXML;
|
||||||
import javafx.scene.control.*;
|
import javafx.scene.control.*;
|
||||||
import javafx.scene.control.cell.PropertyValueFactory;
|
import javafx.scene.control.cell.PropertyValueFactory;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.codec.digest.Md5Crypt;
|
||||||
import org.springframework.http.HttpEntity;
|
import org.springframework.http.HttpEntity;
|
||||||
import org.springframework.http.HttpHeaders;
|
import org.springframework.http.HttpHeaders;
|
||||||
import org.springframework.http.HttpMethod;
|
import org.springframework.http.HttpMethod;
|
||||||
import org.springframework.util.MultiValueMap;
|
import org.springframework.util.MultiValueMap;
|
||||||
import org.springframework.web.client.RestTemplate;
|
import org.springframework.web.client.RestTemplate;
|
||||||
|
|
||||||
|
import javax.script.Invocable;
|
||||||
|
import javax.script.ScriptEngine;
|
||||||
import javax.script.ScriptEngineManager;
|
import javax.script.ScriptEngineManager;
|
||||||
|
import javax.script.ScriptException;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.net.MalformedURLException;
|
import java.net.MalformedURLException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
|
import java.net.URLEncoder;
|
||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
|
import java.security.MessageDigest;
|
||||||
import java.sql.Blob;
|
import java.sql.Blob;
|
||||||
import java.util.HashMap;
|
import java.util.*;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import static com.zhangmeng.tools.music.qq.RequestModule.apiServer;
|
import static com.zhangmeng.tools.music.qq.RequestModule.apiServer;
|
||||||
import static com.zhangmeng.tools.music.qq.RequestModule.headerMap;
|
import static com.zhangmeng.tools.music.qq.RequestModule.headerMap;
|
||||||
|
|
@ -93,7 +102,7 @@ public class MusicDownloadController {
|
||||||
@FXML
|
@FXML
|
||||||
public TextField name;
|
public TextField name;
|
||||||
|
|
||||||
private SimpleIntegerProperty index = new SimpleIntegerProperty(0);
|
private final SimpleIntegerProperty index = new SimpleIntegerProperty(0);
|
||||||
|
|
||||||
public static final String ku_wo_vip_api = "http://www.kuwo.cn/api/www/search/searchMusicBykeyWord?pn=1&rn=30&httpsStatus=1&reqId=a3d144b0-9570-11ed-9918-83c8c32b357d&key=";
|
public static final String ku_wo_vip_api = "http://www.kuwo.cn/api/www/search/searchMusicBykeyWord?pn=1&rn=30&httpsStatus=1&reqId=a3d144b0-9570-11ed-9918-83c8c32b357d&key=";
|
||||||
|
|
||||||
|
|
@ -104,6 +113,10 @@ public class MusicDownloadController {
|
||||||
|
|
||||||
public static RestTemplate restTemplate;
|
public static RestTemplate restTemplate;
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
public Button downloading;
|
||||||
|
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
public void initialize() {
|
public void initialize() {
|
||||||
wangyiyun_music_init();
|
wangyiyun_music_init();
|
||||||
|
|
@ -119,7 +132,7 @@ public class MusicDownloadController {
|
||||||
@Override
|
@Override
|
||||||
public void changed(ObservableValue<? extends Tab> observable, Tab oldValue, Tab newValue) {
|
public void changed(ObservableValue<? extends Tab> observable, Tab oldValue, Tab newValue) {
|
||||||
byte[] bytes = newValue.getText().getBytes(Charset.forName("GBk"));
|
byte[] bytes = newValue.getText().getBytes(Charset.forName("GBk"));
|
||||||
String text = new String(bytes,StandardCharsets.UTF_8);
|
String text = new String(bytes, StandardCharsets.UTF_8);
|
||||||
System.out.println(text);
|
System.out.println(text);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -140,50 +153,130 @@ public class MusicDownloadController {
|
||||||
String title = name.getText();
|
String title = name.getText();
|
||||||
switch (index.get()) {
|
switch (index.get()) {
|
||||||
case 0 -> set(wangyiyun_music_table_view, get_wangyiyun_song_info(title));
|
case 0 -> set(wangyiyun_music_table_view, get_wangyiyun_song_info(title));
|
||||||
case 1 -> set(QQ_music_table_view,get_qq_song_info(title));
|
case 1 -> set(QQ_music_table_view, get_qq_song_info(title));
|
||||||
case 2 -> set(kugou_music_table_view,get_ku_gou_info(title));
|
case 2 -> set(kugou_music_table_view, get_ku_gou_info(title));
|
||||||
case 3 -> set(kuwo_music_table_view,get_kuwo_song_info(title));
|
case 3 -> set(kuwo_music_table_view, get_kuwo_song_info(title));
|
||||||
// case 4 -> set(migu_music_table_view);
|
case 4 -> set(migu_music_table_view, get_migu_song_info(title));
|
||||||
// case 5 -> set(qianqian_music_table_view);
|
case 5 -> set(qianqian_music_table_view,get_qianqian_music_info(title));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
downloading.setOnAction(event -> {
|
||||||
|
download_song();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public ObservableList<SongInfo> get_ku_gou_info(String title){
|
private ObservableList<SongInfo> get_qianqian_music_info(String title) {
|
||||||
ScriptEngineManager manager = new ScriptEngineManager();
|
String api = "https://music.91q.com/v1/search?word=" + title+ "&pageNo=1&type=1×tamp=1682223843&appid=16073360&sign=36fa85caedcd22f0f46ba834679537df";
|
||||||
|
String json = HttpRequest.get(api).timeout(20000).execute().body();
|
||||||
|
QianQianMusic qianQianMusic = JSON.parseObject(json, QianQianMusic.class);
|
||||||
|
ObservableList<SongInfo> list = FXCollections.observableArrayList();
|
||||||
|
List<QianQianMusic.DataBean.TypeTrackBean> results = qianQianMusic.getData().getTypeTrack();
|
||||||
|
int id = 1;
|
||||||
|
for (QianQianMusic.DataBean.TypeTrackBean resList : results) {
|
||||||
|
SongInfo songInfo = new SongInfo();
|
||||||
|
songInfo.setName(resList.getTitle());
|
||||||
|
songInfo.setArtist(resList.getArtist().get(0).getName());
|
||||||
|
songInfo.setAlbum(resList.getAlbumTitle());
|
||||||
|
songInfo.setId(id);
|
||||||
|
id++;
|
||||||
|
list.add(songInfo);
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ObservableList<SongInfo> get_migu_song_info(String title) {
|
||||||
|
|
||||||
|
// Map<String, Object> map = new HashMap<>();
|
||||||
|
// map.put("song", 1);
|
||||||
|
// String searchSwitch = map.toString();
|
||||||
|
// String sid = (uuid() + uuid()).replace("-", "");
|
||||||
|
// String url = "";
|
||||||
|
// String target_url = "https://jadeite.migu.cn/music_search/v2/search/searchAll?sid=" + sid + "&isCorrect=1&isCopyright=1&searchSwitch=" + encode(searchSwitch) + "&pageSize=20&text=" + encode(title) + "&pageNo=1&feature=1000000000&sort=1";
|
||||||
|
// String deviceId = EncryptUtils.md5(uuid().replace("-", "")).toUpperCase();
|
||||||
|
// long timestamp = new Date().getTime();
|
||||||
|
// String signature_md5 = "6cdc72a439cef99a3418d2a78aa28c73"; // app绛惧悕璇佷功鐨刴d5
|
||||||
|
// String text = title + signature_md5 + "yyapp2d16148780a1dcc7408e06336b98cfd50" + deviceId + timestamp;
|
||||||
|
// String sign = EncryptUtils.md5(text);
|
||||||
|
//
|
||||||
|
// Map<String, Object> headers = new HashMap<>();
|
||||||
|
// headers.put("appId", "yyapp2");
|
||||||
|
// headers.put("uiVersion", "A_music_3.3.0");
|
||||||
|
// headers.put("version", "7.0.4");
|
||||||
|
// headers.put("deviceId", deviceId);
|
||||||
|
// headers.put("sign", sign);
|
||||||
|
// headers.put("timestamp", timestamp);
|
||||||
|
SwitchType switchType = SwitchType.getSwitchType();
|
||||||
|
Map<String, Object> map = new HashMap<>();
|
||||||
|
map.put("feature","1111000000");
|
||||||
|
map.put("isCopyright",1);
|
||||||
|
map.put("isCorrect",1);
|
||||||
|
map.put("pageIndex",1);
|
||||||
|
map.put("pageSize",20);
|
||||||
|
map.put("searchSwitch",JSON.toJSONString(switchType));
|
||||||
|
map.put("sort",0);
|
||||||
|
map.put("text",title);
|
||||||
|
map.put("uiVersion","I_music_3.0.2");
|
||||||
|
|
||||||
|
String target_url = "http://jadeite.migu.cn:7090/music_search/v2/search/searchAll";
|
||||||
|
String json = HttpRequest.get(target_url)
|
||||||
|
.form(map).timeout(20000).execute().body();
|
||||||
|
|
||||||
|
MiGuMusic miGuMusic = JSON.parseObject(json, MiGuMusic.class);
|
||||||
|
ObservableList<SongInfo> list = FXCollections.observableArrayList();
|
||||||
|
List<MiGuMusic.Result> results = miGuMusic.getSongResultData().getResult();
|
||||||
|
int id = 1;
|
||||||
|
for (MiGuMusic.Result resList : results) {
|
||||||
|
SongInfo songInfo = new SongInfo();
|
||||||
|
songInfo.setName(resList.getSongName());
|
||||||
|
songInfo.setArtist(resList.getSinger());
|
||||||
|
songInfo.setAlbum(resList.getAlbum());
|
||||||
|
songInfo.setId(id);
|
||||||
|
id++;
|
||||||
|
list.add(songInfo);
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String uuid() {
|
||||||
|
return UUID.randomUUID().toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String encode(String url) {
|
||||||
|
return java.net.URLEncoder.encode(url, StandardCharsets.UTF_8);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ObservableList<SongInfo> get_ku_gou_info(String title) {
|
||||||
String api = "https://songsearch.kugou.com/song_search_v2";
|
String api = "https://songsearch.kugou.com/song_search_v2";
|
||||||
ObservableList<SongInfo> list = FXCollections.observableArrayList();
|
ObservableList<SongInfo> list = FXCollections.observableArrayList();
|
||||||
HashMap<String, Object> paramMap = new HashMap<>();
|
HashMap<String, Object> paramMap = new HashMap<>();
|
||||||
paramMap.put("keyword", title);
|
paramMap.put("keyword", title);
|
||||||
paramMap.put("page", 1);
|
paramMap.put("page", 1);
|
||||||
|
|
||||||
String result3= HttpUtil.get(api, paramMap);
|
String result3 = HttpUtil.get(api, paramMap);
|
||||||
KuGouMusic kuGouMusic = JSON.parseObject(result3, KuGouMusic.class);
|
KuGouMusic kuGouMusic = JSON.parseObject(result3, KuGouMusic.class);
|
||||||
if (kuGouMusic.getData() != null){
|
if (kuGouMusic.getData() != null) {
|
||||||
List<KuGouMusic.ResList> lists = kuGouMusic.getData().getLists();
|
List<KuGouMusic.ResList> lists = kuGouMusic.getData().getLists();
|
||||||
int id = 1;
|
int id = 1;
|
||||||
for (KuGouMusic.ResList resList : lists) {
|
for (KuGouMusic.ResList resList : lists) {
|
||||||
SongInfo songInfo = new SongInfo();
|
SongInfo songInfo = new SongInfo();
|
||||||
songInfo.setName( resList.getSongName());
|
songInfo.setName(resList.getSongName());
|
||||||
songInfo.setArtist(resList.getSingerName());
|
songInfo.setArtist(resList.getSingerName());
|
||||||
songInfo.setAlbum(resList.getAlbumName());
|
songInfo.setAlbum(resList.getAlbumName());
|
||||||
songInfo.setId(id);
|
songInfo.setId(id);
|
||||||
id ++;
|
id++;
|
||||||
list.add(songInfo);
|
list.add(songInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ObservableList<SongInfo> get_kuwo_song_info(String title){
|
public ObservableList<SongInfo> get_kuwo_song_info(String title) {
|
||||||
ObservableList<SongInfo> list = FXCollections.observableArrayList();
|
ObservableList<SongInfo> list = FXCollections.observableArrayList();
|
||||||
List<SongInfo> lists = request_api(title);
|
List<SongInfo> lists = request_api(title);
|
||||||
int i = 0 ;
|
int i = 0;
|
||||||
for (SongInfo listBean : lists) {
|
for (SongInfo listBean : lists) {
|
||||||
i = i + 1 ;
|
i = i + 1;
|
||||||
listBean.setId(i);
|
listBean.setId(i);
|
||||||
list.add(listBean);
|
list.add(listBean);
|
||||||
}
|
}
|
||||||
|
|
@ -214,11 +307,11 @@ public class MusicDownloadController {
|
||||||
}
|
}
|
||||||
HttpEntity<Map<String, String>> httpEntity = new HttpEntity<>(headers);
|
HttpEntity<Map<String, String>> httpEntity = new HttpEntity<>(headers);
|
||||||
|
|
||||||
if (restTemplate == null){
|
if (restTemplate == null) {
|
||||||
restTemplate = new RestTemplate();
|
restTemplate = new RestTemplate();
|
||||||
}
|
}
|
||||||
SearchByKey result = restTemplate.exchange(ku_wo_vip_api + key, HttpMethod.GET, httpEntity, SearchByKey.class).getBody();
|
SearchByKey result = restTemplate.exchange(ku_wo_vip_api + key, HttpMethod.GET, httpEntity, SearchByKey.class).getBody();
|
||||||
if (result != null){
|
if (result != null) {
|
||||||
data_bean.setValue(result);
|
data_bean.setValue(result);
|
||||||
return result.getData().getList();
|
return result.getData().getList();
|
||||||
}
|
}
|
||||||
|
|
@ -229,7 +322,7 @@ public class MusicDownloadController {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public ObservableList<SongInfo> get_qq_song_info(String title){
|
public ObservableList<SongInfo> get_qq_song_info(String title) {
|
||||||
ObservableList<SongInfo> list = FXCollections.observableArrayList();
|
ObservableList<SongInfo> list = FXCollections.observableArrayList();
|
||||||
//String api = "https://u.y.qq.com/cgi-bin/musicu.fcg";
|
//String api = "https://u.y.qq.com/cgi-bin/musicu.fcg";
|
||||||
QqQuery query = new QqQuery();
|
QqQuery query = new QqQuery();
|
||||||
|
|
@ -248,11 +341,11 @@ public class MusicDownloadController {
|
||||||
req.setParam(param);
|
req.setParam(param);
|
||||||
query.setReq(req);
|
query.setReq(req);
|
||||||
String q = JSON.toJSONString(query);
|
String q = JSON.toJSONString(query);
|
||||||
Random ran=new Random(System.currentTimeMillis());
|
Random ran = new Random(System.currentTimeMillis());
|
||||||
String result2 = HttpRequest.post(apiServer[ran.nextInt(apiServer.length)])
|
String result2 = HttpRequest.post(apiServer[ran.nextInt(apiServer.length)])
|
||||||
.header("user-agent","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36 Edg/87.0.664.66")
|
.header("user-agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36 Edg/87.0.664.66")
|
||||||
.header("accept-encoding","application/json")
|
.header("accept-encoding", "application/json")
|
||||||
.form("sign",getSign(q))//表单内容
|
.form("sign", getSign(q))//表单内容
|
||||||
.body(q)
|
.body(q)
|
||||||
.timeout(20000)//超时,毫秒
|
.timeout(20000)//超时,毫秒
|
||||||
.execute().body();
|
.execute().body();
|
||||||
|
|
@ -261,15 +354,15 @@ public class MusicDownloadController {
|
||||||
QQMusic.ResData data = qqMusic.getReq().getData();
|
QQMusic.ResData data = qqMusic.getReq().getData();
|
||||||
QQMusic.Song song = data.getBody().getSong();
|
QQMusic.Song song = data.getBody().getSong();
|
||||||
List<QQMusic.ResList> list1 = song.getList();
|
List<QQMusic.ResList> list1 = song.getList();
|
||||||
if (list1.size()>0) {
|
if (list1.size() > 0) {
|
||||||
int id = 1;
|
int id = 1;
|
||||||
for (QQMusic.ResList resList : list1) {
|
for (QQMusic.ResList resList : list1) {
|
||||||
SongInfo songInfo = new SongInfo();
|
SongInfo songInfo = new SongInfo();
|
||||||
songInfo.setName( resList.getName());
|
songInfo.setName(resList.getName());
|
||||||
songInfo.setArtist(resList.getSinger().get(0).getName());
|
songInfo.setArtist(resList.getSinger().get(0).getName());
|
||||||
songInfo.setAlbum(resList.getAlbum().getName());
|
songInfo.setAlbum(resList.getAlbum().getName());
|
||||||
songInfo.setId(id);
|
songInfo.setId(id);
|
||||||
id ++;
|
id++;
|
||||||
list.add(songInfo);
|
list.add(songInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -277,7 +370,7 @@ public class MusicDownloadController {
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getSign(String params){
|
public String getSign(String params) {
|
||||||
return QqEncrypt.getSign(JSON.toJSONString(params));
|
return QqEncrypt.getSign(JSON.toJSONString(params));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -296,7 +389,7 @@ public class MusicDownloadController {
|
||||||
.timeout(20000)//超时,毫秒
|
.timeout(20000)//超时,毫秒
|
||||||
.execute().body();
|
.execute().body();
|
||||||
WangYiYunMusic wangYiYunMusic = JSON.parseObject(result2, WangYiYunMusic.class);
|
WangYiYunMusic wangYiYunMusic = JSON.parseObject(result2, WangYiYunMusic.class);
|
||||||
if (wangYiYunMusic.getResult() == null){
|
if (wangYiYunMusic.getResult() == null) {
|
||||||
result2 = HttpRequest.post(api)
|
result2 = HttpRequest.post(api)
|
||||||
.header(Header.USER_AGENT, "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36")//头信息,多个头信息多次调用此方法即可
|
.header(Header.USER_AGENT, "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36")//头信息,多个头信息多次调用此方法即可
|
||||||
.form(query)//表单内容
|
.form(query)//表单内容
|
||||||
|
|
@ -322,15 +415,15 @@ public class MusicDownloadController {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static void set_songInfo(SongInfo listBean){
|
public static void set_songInfo(SongInfo listBean) {
|
||||||
String req_id = data_bean.getValue().getReqId();
|
String req_id = data_bean.getValue().getReqId();
|
||||||
int mid = listBean.getRid();
|
int mid = listBean.getRid();
|
||||||
String url = download_url + "&reqId=" + req_id + "&mid=" + mid;
|
String url = download_url + "&reqId=" + req_id + "&mid=" + mid;
|
||||||
if (restTemplate == null){
|
if (restTemplate == null) {
|
||||||
restTemplate = new RestTemplate();
|
restTemplate = new RestTemplate();
|
||||||
}
|
}
|
||||||
DownLoadURL result = restTemplate.getForObject(url ,DownLoadURL.class);
|
DownLoadURL result = restTemplate.getForObject(url, DownLoadURL.class);
|
||||||
if (result != null){
|
if (result != null) {
|
||||||
String url1 = result.getData().getUrl();
|
String url1 = result.getData().getUrl();
|
||||||
DownLoadInfo loadInfo = new DownLoadInfo();
|
DownLoadInfo loadInfo = new DownLoadInfo();
|
||||||
loadInfo.setSong_url(url1);
|
loadInfo.setSong_url(url1);
|
||||||
|
|
@ -339,39 +432,39 @@ public class MusicDownloadController {
|
||||||
down_load_info.set(loadInfo);
|
down_load_info.set(loadInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
|
||||||
// public static void download_song(){
|
public static void download_song(){
|
||||||
// String path = "C:/Users/Administrator/Desktop/";
|
String path = "C:/Users/Administrator/Desktop/";
|
||||||
// DownLoadInfo value = down_load_info.getValue();
|
DownLoadInfo value = down_load_info.getValue();
|
||||||
// if (value != null){
|
if (value != null){
|
||||||
// String song_name =value.getSong_author() + "--" + value.getSong_name() + ".mp3";
|
String song_name =value.getSong_author() + "--" + value.getSong_name() + ".mp3";
|
||||||
// String save_path = path + song_name;
|
String save_path = path + song_name;
|
||||||
// save_file(save_path,value.getSong_url());
|
save_file(save_path,value.getSong_url());
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// public static void save_file(String save_path,String download_url){
|
public static void save_file(String save_path,String download_url){
|
||||||
// try {
|
try {
|
||||||
// Path path1 = Paths.get(save_path);
|
Path path1 = Paths.get(save_path);
|
||||||
// boolean exists = Files.exists(path1);
|
boolean exists = Files.exists(path1);
|
||||||
// if (!exists){
|
if (!exists){
|
||||||
// Files.createFile(path1);
|
Files.createFile(path1);
|
||||||
// }
|
}
|
||||||
// File file = path1.toFile();
|
File file = path1.toFile();
|
||||||
// FileOutputStream fs = new FileOutputStream(file);
|
FileOutputStream fs = new FileOutputStream(file);
|
||||||
// URL url = new URL(download_url);
|
URL url = new URL(download_url);
|
||||||
// InputStream inputStream = url.openStream();
|
InputStream inputStream = url.openStream();
|
||||||
// int available = inputStream.available();
|
int available = inputStream.available();
|
||||||
// byte[] bytes = new byte[1024];
|
byte[] bytes = new byte[1024];
|
||||||
// int byteRead = 0;
|
int byteRead = 0;
|
||||||
// while ((byteRead = inputStream.read(bytes)) != -1 ){
|
while ((byteRead = inputStream.read(bytes)) != -1 ){
|
||||||
// fs.write(bytes, 0, byteRead);
|
fs.write(bytes, 0, byteRead);
|
||||||
// }
|
}
|
||||||
// inputStream.close();
|
inputStream.close();
|
||||||
// fs.close();
|
fs.close();
|
||||||
// } catch (IOException e) {
|
} catch (IOException e) {
|
||||||
// e.printStackTrace();
|
e.printStackTrace();
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
|
|
||||||
|
|
||||||
public void set(TableView<SongInfo> tableView, ObservableList<SongInfo> items) {
|
public void set(TableView<SongInfo> tableView, ObservableList<SongInfo> items) {
|
||||||
|
|
@ -427,5 +520,11 @@ public class MusicDownloadController {
|
||||||
init_table.getColumns().add(song_name);
|
init_table.getColumns().add(song_name);
|
||||||
init_table.getColumns().add(user_name);
|
init_table.getColumns().add(user_name);
|
||||||
init_table.getColumns().add(zhuan_ji_name);
|
init_table.getColumns().add(zhuan_ji_name);
|
||||||
|
|
||||||
|
init_table.getSelectionModel().selectedItemProperty().addListener((observable, oldValue, newValue) -> {
|
||||||
|
if (newValue != null){
|
||||||
|
set_songInfo(newValue);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,770 @@
|
||||||
|
package com.zhangmeng.tools.music.migu;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author : 芊芊墨客
|
||||||
|
* @version : 1.0
|
||||||
|
* @date : 2023-04-23 11:34
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class MiGuMusic {
|
||||||
|
|
||||||
|
|
||||||
|
public String code;
|
||||||
|
public ConcertResultData concertResultData;
|
||||||
|
public Integer dynamicEffect;
|
||||||
|
public Boolean end;
|
||||||
|
public String info;
|
||||||
|
public Integer mod;
|
||||||
|
public Integer resultNum;
|
||||||
|
public SongResultData songResultData;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class Album {
|
||||||
|
|
||||||
|
public String id;
|
||||||
|
public String name;
|
||||||
|
public String type;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class AlbumImg {
|
||||||
|
|
||||||
|
public String fileId;
|
||||||
|
public String img;
|
||||||
|
public String imgSizeType;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class Artist {
|
||||||
|
|
||||||
|
public String name;
|
||||||
|
public String id;
|
||||||
|
public String nameSpelling;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class ConcertResultData {
|
||||||
|
|
||||||
|
public List<Object> result = new ArrayList<Object>();
|
||||||
|
public String totalCount;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class ImgItem {
|
||||||
|
|
||||||
|
public String fileId;
|
||||||
|
public String img;
|
||||||
|
public String imgSizeType;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class MiguImgItem {
|
||||||
|
|
||||||
|
public String img;
|
||||||
|
public String imgSizeType;
|
||||||
|
public String fileId;
|
||||||
|
public String webpImg;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class MiguImgItem__1 {
|
||||||
|
|
||||||
|
public String img;
|
||||||
|
public String imgSizeType;
|
||||||
|
public String fileId;
|
||||||
|
public String webpImg;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class MiguImgItem__10 {
|
||||||
|
|
||||||
|
public String img;
|
||||||
|
public String imgSizeType;
|
||||||
|
public String fileId;
|
||||||
|
public String webpImg;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class MiguImgItem__11 {
|
||||||
|
|
||||||
|
public String img;
|
||||||
|
public String imgSizeType;
|
||||||
|
public String fileId;
|
||||||
|
public String webpImg;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class MiguImgItem__12 {
|
||||||
|
|
||||||
|
public String img;
|
||||||
|
public String imgSizeType;
|
||||||
|
public String fileId;
|
||||||
|
public String webpImg;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class MiguImgItem__13 {
|
||||||
|
|
||||||
|
public String img;
|
||||||
|
public String imgSizeType;
|
||||||
|
public String fileId;
|
||||||
|
public String webpImg;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class MiguImgItem__14 {
|
||||||
|
|
||||||
|
public String img;
|
||||||
|
public String imgSizeType;
|
||||||
|
public String fileId;
|
||||||
|
public String webpImg;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class MiguImgItem__15 {
|
||||||
|
|
||||||
|
public String img;
|
||||||
|
public String imgSizeType;
|
||||||
|
public String fileId;
|
||||||
|
public String webpImg;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class MiguImgItem__16 {
|
||||||
|
|
||||||
|
public String img;
|
||||||
|
public String imgSizeType;
|
||||||
|
public String fileId;
|
||||||
|
public String webpImg;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class MiguImgItem__17 {
|
||||||
|
|
||||||
|
public String img;
|
||||||
|
public String imgSizeType;
|
||||||
|
public String fileId;
|
||||||
|
public String webpImg;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class MiguImgItem__18 {
|
||||||
|
|
||||||
|
public String img;
|
||||||
|
public String imgSizeType;
|
||||||
|
public String fileId;
|
||||||
|
public String webpImg;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class MiguImgItem__19 {
|
||||||
|
|
||||||
|
public String img;
|
||||||
|
public String imgSizeType;
|
||||||
|
public String fileId;
|
||||||
|
public String webpImg;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class MiguImgItem__2 {
|
||||||
|
|
||||||
|
public String img;
|
||||||
|
public String imgSizeType;
|
||||||
|
public String fileId;
|
||||||
|
public String webpImg;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class MiguImgItem__20 {
|
||||||
|
|
||||||
|
public String img;
|
||||||
|
public String imgSizeType;
|
||||||
|
public String fileId;
|
||||||
|
public String webpImg;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class MiguImgItem__21 {
|
||||||
|
|
||||||
|
public String img;
|
||||||
|
public String imgSizeType;
|
||||||
|
public String fileId;
|
||||||
|
public String webpImg;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class MiguImgItem__22 {
|
||||||
|
|
||||||
|
public String img;
|
||||||
|
public String imgSizeType;
|
||||||
|
public String fileId;
|
||||||
|
public String webpImg;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class MiguImgItem__3 {
|
||||||
|
|
||||||
|
public String img;
|
||||||
|
public String imgSizeType;
|
||||||
|
public String fileId;
|
||||||
|
public String webpImg;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class MiguImgItem__4 {
|
||||||
|
|
||||||
|
public String img;
|
||||||
|
public String imgSizeType;
|
||||||
|
public String fileId;
|
||||||
|
public String webpImg;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class MiguImgItem__5 {
|
||||||
|
|
||||||
|
public String img;
|
||||||
|
public String imgSizeType;
|
||||||
|
public String fileId;
|
||||||
|
public String webpImg;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class MiguImgItem__6 {
|
||||||
|
|
||||||
|
public String img;
|
||||||
|
public String imgSizeType;
|
||||||
|
public String fileId;
|
||||||
|
public String webpImg;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class MiguImgItem__7 {
|
||||||
|
|
||||||
|
public String img;
|
||||||
|
public String imgSizeType;
|
||||||
|
public String fileId;
|
||||||
|
public String webpImg;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class MiguImgItem__8 {
|
||||||
|
|
||||||
|
public String img;
|
||||||
|
public String imgSizeType;
|
||||||
|
public String fileId;
|
||||||
|
public String webpImg;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class MiguImgItem__9 {
|
||||||
|
|
||||||
|
public String img;
|
||||||
|
public String imgSizeType;
|
||||||
|
public String fileId;
|
||||||
|
public String webpImg;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class NewRateFormat {
|
||||||
|
|
||||||
|
public String fileType;
|
||||||
|
public String format;
|
||||||
|
public String formatType;
|
||||||
|
public String price;
|
||||||
|
public String resourceType;
|
||||||
|
public String size;
|
||||||
|
public String androidAccuracyLevel;
|
||||||
|
public String androidFormat;
|
||||||
|
public String androidSize;
|
||||||
|
public String iosAccuracyLevel;
|
||||||
|
public String iosFormat;
|
||||||
|
public String iosSize;
|
||||||
|
public Integer androidBit;
|
||||||
|
public String androidNewFormat;
|
||||||
|
public Integer iosBit;
|
||||||
|
public List<String> showTag = new ArrayList<String>();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class OpNumItem {
|
||||||
|
|
||||||
|
public Integer bookingNum;
|
||||||
|
public String bookingNumDesc;
|
||||||
|
public Integer commentNum;
|
||||||
|
public String commentNumDesc;
|
||||||
|
public Integer followNum;
|
||||||
|
public String followNumDesc;
|
||||||
|
public Integer keepNum;
|
||||||
|
public String keepNumDesc;
|
||||||
|
public Integer livePlayNum;
|
||||||
|
public String livePlayNumDesc;
|
||||||
|
public Integer orderNumByTotal;
|
||||||
|
public String orderNumByTotalDesc;
|
||||||
|
public Integer orderNumByWeek;
|
||||||
|
public String orderNumByWeekDesc;
|
||||||
|
public Integer playNum;
|
||||||
|
public String playNumDesc;
|
||||||
|
public Integer popularNum;
|
||||||
|
public String popularNumDesc;
|
||||||
|
public Integer shareNum;
|
||||||
|
public String shareNumDesc;
|
||||||
|
public Integer subscribeNum;
|
||||||
|
public String subscribeNumDesc;
|
||||||
|
public Integer thumbNum;
|
||||||
|
public String thumbNumDesc;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class RateFormat {
|
||||||
|
|
||||||
|
public String fileType;
|
||||||
|
public String format;
|
||||||
|
public String formatType;
|
||||||
|
public String price;
|
||||||
|
public String resourceType;
|
||||||
|
public String size;
|
||||||
|
public String androidAccuracyLevel;
|
||||||
|
public String androidFormat;
|
||||||
|
public String androidSize;
|
||||||
|
public String iosAccuracyLevel;
|
||||||
|
public String iosFormat;
|
||||||
|
public String iosSize;
|
||||||
|
public List<String> showTag = new ArrayList<String>();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class RelatedSong {
|
||||||
|
|
||||||
|
public String copyrightId;
|
||||||
|
public String productId;
|
||||||
|
public String resourceType;
|
||||||
|
public String resourceTypeName;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class Result {
|
||||||
|
|
||||||
|
public String album;
|
||||||
|
public String albumId;
|
||||||
|
public List<AlbumImg> albumImgs = new ArrayList<>();
|
||||||
|
public String albumNamePinyin;
|
||||||
|
public List<Album> albums = new ArrayList<Album>();
|
||||||
|
public List<Artist> artists = new ArrayList<Artist>();
|
||||||
|
public String chargeAuditions;
|
||||||
|
public String clickRatioString;
|
||||||
|
public Integer collect;
|
||||||
|
public String contentId;
|
||||||
|
public String copyright;
|
||||||
|
public String copyrightId;
|
||||||
|
public String dalbumId;
|
||||||
|
public String digitalColumnId;
|
||||||
|
public List<String> highlightStr = new ArrayList<>();
|
||||||
|
public String id;
|
||||||
|
public List<ImgItem> imgItems = new ArrayList<>();
|
||||||
|
public String invalidateDate;
|
||||||
|
public String isInDAlbum;
|
||||||
|
public String isInSalesPeriod;
|
||||||
|
public String isInSideDalbum;
|
||||||
|
public String lrcUrl;
|
||||||
|
public String lyricUrl;
|
||||||
|
public String mrcUrl;
|
||||||
|
public String mrcurl;
|
||||||
|
public String name;
|
||||||
|
public List<NewRateFormat> newRateFormats = new ArrayList<NewRateFormat>();
|
||||||
|
public OpNumItem opNumItem;
|
||||||
|
public String originalSing;
|
||||||
|
public List<RateFormat> rateFormats = new ArrayList<RateFormat>();
|
||||||
|
public List<RelatedSong> relatedSongs = new ArrayList<RelatedSong>();
|
||||||
|
public String resourceType;
|
||||||
|
public String scopeOfcopyright;
|
||||||
|
public List<String> showTag = new ArrayList<String>();
|
||||||
|
public String singer;
|
||||||
|
public String singerId;
|
||||||
|
public SingerImg singerImg;
|
||||||
|
public List<Singer> singers = new ArrayList<Singer>();
|
||||||
|
public String songAliasName;
|
||||||
|
public String songDescs;
|
||||||
|
public String songId;
|
||||||
|
public String songName;
|
||||||
|
public String songNamePinyin;
|
||||||
|
public String songType;
|
||||||
|
public List<String> tags = new ArrayList<String>();
|
||||||
|
public String toneControl;
|
||||||
|
public String toneControl2;
|
||||||
|
public List<Tone> tones = new ArrayList<Tone>();
|
||||||
|
public String topQuality;
|
||||||
|
public String trcUrl;
|
||||||
|
public String vipType;
|
||||||
|
public String translateName;
|
||||||
|
public List<String> lyricist = new ArrayList<String>();
|
||||||
|
public String listenFlag;
|
||||||
|
public List<String> televisionNames = new ArrayList<String>();
|
||||||
|
public Z3dCode z3dCode;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class Singer {
|
||||||
|
|
||||||
|
public String id;
|
||||||
|
public String name;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class SingerImg {
|
||||||
|
|
||||||
|
public _1110025454 _1110025454;
|
||||||
|
public _1106612610 _1106612610;
|
||||||
|
public _1128041821 _1128041821;
|
||||||
|
public _1000000616 _1000000616;
|
||||||
|
public _259 _259;
|
||||||
|
public _1106069877 _1106069877;
|
||||||
|
public _1112416345 _1112416345;
|
||||||
|
public _1139999007 _1139999007;
|
||||||
|
public _1115824553 _1115824553;
|
||||||
|
public _484621 _484621;
|
||||||
|
public _1106620514 _1106620514;
|
||||||
|
public _375 _375;
|
||||||
|
public _1546 _1546;
|
||||||
|
public _1139071278 _1139071278;
|
||||||
|
public _5583 _5583;
|
||||||
|
public _965 _965;
|
||||||
|
public _59923 _59923;
|
||||||
|
public _127339 _127339;
|
||||||
|
public _1790 _1790;
|
||||||
|
public _1106265834 _1106265834;
|
||||||
|
public _1001636388 _1001636388;
|
||||||
|
public _1000285589 _1000285589;
|
||||||
|
public _1002164585 _1002164585;
|
||||||
|
public _1001769963 _1001769963;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class SongResultData {
|
||||||
|
|
||||||
|
public List<Object> correct = new ArrayList<Object>();
|
||||||
|
public String isFromCache;
|
||||||
|
public List<Result> result = new ArrayList<Result>();
|
||||||
|
public String resultType;
|
||||||
|
public String tipStatus;
|
||||||
|
public String totalCount;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class Tone {
|
||||||
|
|
||||||
|
public String copyrightId;
|
||||||
|
public String expireDate;
|
||||||
|
public String id;
|
||||||
|
public String price;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class Z3dCode {
|
||||||
|
|
||||||
|
public String androidFileKey;
|
||||||
|
public String androidFormat;
|
||||||
|
public String androidSize;
|
||||||
|
public String formatType;
|
||||||
|
public String h5Format;
|
||||||
|
public String h5Size;
|
||||||
|
public String iosFileKey;
|
||||||
|
public String iosFormat;
|
||||||
|
public String iosSize;
|
||||||
|
public String price;
|
||||||
|
public String resourceType;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class _1000000616 {
|
||||||
|
|
||||||
|
public String singerName;
|
||||||
|
public List<MiguImgItem__3> miguImgItems = new ArrayList<>();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class _1000285589 {
|
||||||
|
|
||||||
|
public String singerName;
|
||||||
|
public List<MiguImgItem__20> miguImgItems = new ArrayList<>();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class _1001636388 {
|
||||||
|
|
||||||
|
public String singerName;
|
||||||
|
public List<MiguImgItem__19> miguImgItems = new ArrayList<>();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class _1001769963 {
|
||||||
|
|
||||||
|
public String singerName;
|
||||||
|
public List<MiguImgItem__22> miguImgItems = new ArrayList<MiguImgItem__22>();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class _1002164585 {
|
||||||
|
|
||||||
|
public String singerName;
|
||||||
|
public List<MiguImgItem__21> miguImgItems = new ArrayList<MiguImgItem__21>();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class _1106069877 {
|
||||||
|
|
||||||
|
public String singerName;
|
||||||
|
public List<MiguImgItem__5> miguImgItems = new ArrayList<MiguImgItem__5>();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class _1106265834 {
|
||||||
|
|
||||||
|
public String singerName;
|
||||||
|
public List<MiguImgItem__18> miguImgItems = new ArrayList<MiguImgItem__18>();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class _1106612610 {
|
||||||
|
|
||||||
|
public String singerName;
|
||||||
|
public List<MiguImgItem__1> miguImgItems = new ArrayList<MiguImgItem__1>();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class _1106620514 {
|
||||||
|
|
||||||
|
public String singerName;
|
||||||
|
public List<MiguImgItem__9> miguImgItems = new ArrayList<MiguImgItem__9>();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class _1110025454 {
|
||||||
|
|
||||||
|
public String singerName;
|
||||||
|
public List<MiguImgItem> miguImgItems = new ArrayList<MiguImgItem>();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class _1112416345 {
|
||||||
|
|
||||||
|
public String singerName;
|
||||||
|
public List<MiguImgItem__6> miguImgItems = new ArrayList<MiguImgItem__6>();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class _1115824553 {
|
||||||
|
|
||||||
|
public String singerName;
|
||||||
|
public List<MiguImgItem__7> miguImgItems = new ArrayList<MiguImgItem__7>();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class _1128041821 {
|
||||||
|
|
||||||
|
public String singerName;
|
||||||
|
public List<MiguImgItem__2> miguImgItems = new ArrayList<MiguImgItem__2>();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class _1139071278 {
|
||||||
|
|
||||||
|
public String singerName;
|
||||||
|
public List<MiguImgItem__12> miguImgItems = new ArrayList<MiguImgItem__12>();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class _1139999007 {
|
||||||
|
|
||||||
|
public String singerName;
|
||||||
|
public List<Object> miguImgItems = new ArrayList<Object>();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class _127339 {
|
||||||
|
|
||||||
|
public String singerName;
|
||||||
|
public List<MiguImgItem__16> miguImgItems = new ArrayList<MiguImgItem__16>();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class _1546 {
|
||||||
|
|
||||||
|
public String singerName;
|
||||||
|
public List<MiguImgItem__11> miguImgItems = new ArrayList<MiguImgItem__11>();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class _1790 {
|
||||||
|
|
||||||
|
public String singerName;
|
||||||
|
public List<MiguImgItem__17> miguImgItems = new ArrayList<MiguImgItem__17>();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class _259 {
|
||||||
|
|
||||||
|
public String singerName;
|
||||||
|
public List<MiguImgItem__4> miguImgItems = new ArrayList<MiguImgItem__4>();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class _375 {
|
||||||
|
|
||||||
|
public String singerName;
|
||||||
|
public List<MiguImgItem__10> miguImgItems = new ArrayList<MiguImgItem__10>();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class _484621 {
|
||||||
|
|
||||||
|
public String singerName;
|
||||||
|
public List<MiguImgItem__8> miguImgItems = new ArrayList<MiguImgItem__8>();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class _5583 {
|
||||||
|
|
||||||
|
public String singerName;
|
||||||
|
public List<MiguImgItem__13> miguImgItems = new ArrayList<MiguImgItem__13>();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class _59923 {
|
||||||
|
|
||||||
|
public String singerName;
|
||||||
|
public List<MiguImgItem__15> miguImgItems = new ArrayList<MiguImgItem__15>();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class _965 {
|
||||||
|
|
||||||
|
public String singerName;
|
||||||
|
public List<MiguImgItem__14> miguImgItems = new ArrayList<MiguImgItem__14>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,44 @@
|
||||||
|
package com.zhangmeng.tools.music.migu;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author : 芊芊墨客
|
||||||
|
* @version : 1.0
|
||||||
|
* @date : 2023-04-23 12:02
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class SwitchType {
|
||||||
|
public Integer song;
|
||||||
|
public Integer album;
|
||||||
|
public Integer singer;
|
||||||
|
public Integer tagSong;
|
||||||
|
public Integer mvSong;
|
||||||
|
public Integer songlist;
|
||||||
|
public Integer bestShow;
|
||||||
|
public Integer lyricSong;
|
||||||
|
public Integer concert;
|
||||||
|
public Integer periodical;
|
||||||
|
public Integer ticket;
|
||||||
|
public Integer bit24;
|
||||||
|
public Integer verticalVideoTone;
|
||||||
|
|
||||||
|
//{"song":1,"album":0,"singer":0,"tagSong":1,"mvSong":0,"songlist":0,"bestShow":1,"lyricSong":0,"concert":0,"periodical":0,"ticket":0,"bit24":0,"verticalVideoTone":0}
|
||||||
|
public static SwitchType getSwitchType (){
|
||||||
|
SwitchType switchType = new SwitchType();
|
||||||
|
switchType.setSong(1);
|
||||||
|
switchType.setAlbum(0);
|
||||||
|
switchType.setSinger(0);
|
||||||
|
switchType.setTagSong(1);
|
||||||
|
switchType.setMvSong(0);
|
||||||
|
switchType.setSonglist(0);
|
||||||
|
switchType.setBestShow(1);
|
||||||
|
switchType.setLyricSong(0);
|
||||||
|
switchType.setConcert(0);
|
||||||
|
switchType.setPeriodical(0);
|
||||||
|
switchType.setTicket(0);
|
||||||
|
switchType.setBit24(0);
|
||||||
|
switchType.setVerticalVideoTone(0);
|
||||||
|
return switchType;
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,188 @@
|
||||||
|
package com.zhangmeng.tools.utils;
|
||||||
|
|
||||||
|
|
||||||
|
import org.bouncycastle.jce.provider.BouncyCastleProvider;
|
||||||
|
import org.bouncycastle.util.encoders.Base64;
|
||||||
|
import org.bouncycastle.x509.X509V3CertificateGenerator;
|
||||||
|
|
||||||
|
import javax.security.auth.x500.X500Principal;
|
||||||
|
import java.io.FileInputStream;
|
||||||
|
import java.io.FileOutputStream;
|
||||||
|
import java.math.BigInteger;
|
||||||
|
import java.security.*;
|
||||||
|
import java.security.cert.Certificate;
|
||||||
|
import java.security.cert.CertificateFactory;
|
||||||
|
import java.security.cert.X509Certificate;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.Enumeration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author : 芊芊墨客
|
||||||
|
* @version : 1.0
|
||||||
|
* @date : 2023-04-23 09:17
|
||||||
|
*/
|
||||||
|
public class JksUtils {
|
||||||
|
|
||||||
|
public static class GetCertFile {
|
||||||
|
|
||||||
|
//证书颁发者
|
||||||
|
static String CertificateIssuer = "C=中国,ST=广东,L=广州,O=人民组织,OU=人民单位,CN=人民颁发";
|
||||||
|
//证书使用者
|
||||||
|
static String CertificateUser = "C=中国,ST=广东,L=广州,O=人民组织,OU=人民单位,CN=";
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
try {
|
||||||
|
X509Certificate cert = getCert();
|
||||||
|
System.out.println(cert.toString());
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
* CN(Common Name名字与姓氏)
|
||||||
|
* OU(Organization Unit组织单位名称)
|
||||||
|
* O(Organization组织名称)
|
||||||
|
* ST(State州或省份名称)
|
||||||
|
* C(Country国家名称)
|
||||||
|
* L(Locality城市或区域名称)
|
||||||
|
* */
|
||||||
|
public static X509Certificate getCert() throws Exception {
|
||||||
|
KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("RSA");
|
||||||
|
keyPairGenerator.initialize(1024);
|
||||||
|
KeyPair keyPair = keyPairGenerator.generateKeyPair();
|
||||||
|
PublicKey publicKey = keyPair.getPublic();
|
||||||
|
X509V3CertificateGenerator x509V3CertificateGenerator = new X509V3CertificateGenerator();
|
||||||
|
//设置证书序列号
|
||||||
|
x509V3CertificateGenerator.setSerialNumber(BigInteger.TEN);
|
||||||
|
//设置证书颁发者
|
||||||
|
x509V3CertificateGenerator.setIssuerDN(new X500Principal(CertificateIssuer));
|
||||||
|
//设置证书使用者
|
||||||
|
x509V3CertificateGenerator.setSubjectDN(new X500Principal(CertificateUser + "sun"));
|
||||||
|
//设置证书有效期
|
||||||
|
x509V3CertificateGenerator.setNotAfter(new Date(System.currentTimeMillis() + 1000 * 365 * 24 * 3600));
|
||||||
|
x509V3CertificateGenerator.setNotBefore(new Date(System.currentTimeMillis()));
|
||||||
|
//设置证书签名算法
|
||||||
|
x509V3CertificateGenerator.setSignatureAlgorithm("SHA1withRSA");
|
||||||
|
|
||||||
|
x509V3CertificateGenerator.setPublicKey(publicKey);
|
||||||
|
|
||||||
|
//临时bc方法添加都环境变量
|
||||||
|
Security.addProvider(new BouncyCastleProvider());
|
||||||
|
X509Certificate x509Certificate = x509V3CertificateGenerator.generateX509Certificate(keyPair.getPrivate(), "BC");
|
||||||
|
//写入文件
|
||||||
|
FileOutputStream fos = new FileOutputStream("F:\\cer.cer");
|
||||||
|
fos.write(x509Certificate.getEncoded());
|
||||||
|
fos.flush();
|
||||||
|
fos.close();
|
||||||
|
return x509Certificate;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class GetJksAndCerFile {
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
buildKeyAndSaveToJksFile();
|
||||||
|
exportCerFile();
|
||||||
|
try {
|
||||||
|
readJks();
|
||||||
|
readCer();
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static void executeCommand(String[] arstringCommand) {
|
||||||
|
try {
|
||||||
|
Runtime.getRuntime().exec(arstringCommand);
|
||||||
|
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
System.out.println(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//生成密钥并保存到jks文件
|
||||||
|
public static void buildKeyAndSaveToJksFile() {
|
||||||
|
String[] command = new String[]{
|
||||||
|
"cmd ",
|
||||||
|
"/k",
|
||||||
|
"start", // cmd Shell命令
|
||||||
|
"keytool", "-genkeypair", //表示生成密钥
|
||||||
|
"-alias", //要处理的条目的别名(jks文件别名)
|
||||||
|
"sun",
|
||||||
|
"-keyalg", //密钥算法名称(如 RSA DSA(默认是DSA))
|
||||||
|
"RSA",
|
||||||
|
"-keysize",//密钥位大小(长度)
|
||||||
|
"1024",
|
||||||
|
"-sigalg", //签名算法名称
|
||||||
|
"SHA1withRSA",
|
||||||
|
"-dname",// 唯一判别名,CN=(名字与姓氏), OU=(组织单位名称), O=(组织名称), L=(城市或区域名称),
|
||||||
|
// ST=(州或省份名称), C=(单位的两字母国家代码)"
|
||||||
|
"CN=(张三), OU=(人民单位), O=(人民组织), L=(广州), ST=(广东), C=(中国)",
|
||||||
|
"-validity", // 有效天数
|
||||||
|
"36500",
|
||||||
|
"-keypass",// 密钥口令(私钥的密码)
|
||||||
|
"123456",
|
||||||
|
"-keystore", //密钥库名称(jks文件路径)
|
||||||
|
"f:/demo.jks",
|
||||||
|
"-storepass", // 密钥库口令(jks文件的密码)
|
||||||
|
"123456",
|
||||||
|
"-v"// 详细输出(秘钥库中证书的详细信息)
|
||||||
|
};
|
||||||
|
executeCommand(command);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//从jks文件中导出证书文件
|
||||||
|
public static void exportCerFile() {
|
||||||
|
String[] command = new String[]{
|
||||||
|
"cmd ", "/k",
|
||||||
|
"start", // cmd Shell命令
|
||||||
|
|
||||||
|
"keytool",
|
||||||
|
"-exportcert", // - export指定为导出操作
|
||||||
|
"-alias", // -alias指定别名,这里是ss
|
||||||
|
"sun",
|
||||||
|
"-keystore", // -keystore指定keystore文件,这里是d:/demo.keystore
|
||||||
|
"f:/demo.jks",
|
||||||
|
"-rfc",
|
||||||
|
"-file",//-file指向导出路径
|
||||||
|
"f:/demo.cer",
|
||||||
|
"-storepass",// 指定密钥库的密码
|
||||||
|
"123456"
|
||||||
|
};
|
||||||
|
executeCommand(command);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//读取jks文件获取公、私钥
|
||||||
|
public static void readJks() throws Exception {
|
||||||
|
KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
|
||||||
|
keyStore.load(new FileInputStream("f:\\demo.jks"), "123456".toCharArray());
|
||||||
|
Enumeration<String> aliases = keyStore.aliases();
|
||||||
|
String alias = null;
|
||||||
|
while (aliases.hasMoreElements()) {
|
||||||
|
alias = aliases.nextElement();
|
||||||
|
}
|
||||||
|
System.out.println("jks文件别名是:" + alias);
|
||||||
|
PrivateKey key = (PrivateKey) keyStore.getKey(alias, "123456".toCharArray());
|
||||||
|
System.out.println("jks文件中的私钥是:" + new String(Base64.encode(key.getEncoded())));
|
||||||
|
Certificate certificate = keyStore.getCertificate(alias);
|
||||||
|
PublicKey publicKey = certificate.getPublicKey();
|
||||||
|
System.out.println("jks文件中的公钥:" + new String(Base64.encode(publicKey.getEncoded())));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//读取证书文件获取公钥
|
||||||
|
public static void readCer() throws Exception {
|
||||||
|
CertificateFactory certificateFactory = CertificateFactory.getInstance("X.509");
|
||||||
|
Certificate certificate =
|
||||||
|
certificateFactory.generateCertificate(new FileInputStream("f:\\demo.cer"));
|
||||||
|
PublicKey publicKey = certificate.getPublicKey();
|
||||||
|
System.out.println("证书中的公钥:" + new String(Base64.encode(publicKey.getEncoded())));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -5,38 +5,32 @@
|
||||||
<?import javafx.scene.control.Label?>
|
<?import javafx.scene.control.Label?>
|
||||||
<?import javafx.scene.control.Tab?>
|
<?import javafx.scene.control.Tab?>
|
||||||
<?import javafx.scene.control.TabPane?>
|
<?import javafx.scene.control.TabPane?>
|
||||||
<?import javafx.scene.control.TableColumn?>
|
|
||||||
<?import javafx.scene.control.TableView?>
|
<?import javafx.scene.control.TableView?>
|
||||||
<?import javafx.scene.control.TextField?>
|
<?import javafx.scene.control.TextField?>
|
||||||
<?import javafx.scene.layout.AnchorPane?>
|
<?import javafx.scene.layout.AnchorPane?>
|
||||||
<?import javafx.scene.layout.HBox?>
|
<?import javafx.scene.layout.HBox?>
|
||||||
|
|
||||||
<AnchorPane prefHeight="649.0" prefWidth="1200.0" xmlns="http://javafx.com/javafx/19"
|
<AnchorPane prefHeight="649.0" prefWidth="1200.0" xmlns="http://javafx.com/javafx/19" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.zhangmeng.tools.controller.MusicDownloadController">
|
||||||
xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.zhangmeng.tools.controller.MusicDownloadController">
|
|
||||||
<children>
|
<children>
|
||||||
<HBox alignment="CENTER" layoutX="318.0" layoutY="80.0" prefHeight="25.0" prefWidth="576.0" spacing="20.0"
|
<HBox alignment="CENTER" layoutX="233.0" layoutY="80.0" prefHeight="25.0" prefWidth="708.0" spacing="20.0" AnchorPane.leftAnchor="233.0" AnchorPane.rightAnchor="259.0">
|
||||||
AnchorPane.leftAnchor="318.0" AnchorPane.rightAnchor="306.0">
|
|
||||||
<children>
|
<children>
|
||||||
<Label text="歌曲名/歌手名:">
|
<Label prefHeight="17.0" prefWidth="111.0" text="歌曲名/歌手名:">
|
||||||
<opaqueInsets>
|
<opaqueInsets>
|
||||||
<Insets/>
|
<Insets />
|
||||||
</opaqueInsets>
|
</opaqueInsets>
|
||||||
</Label>
|
</Label>
|
||||||
<TextField prefHeight="25.0" prefWidth="409.0" fx:id="name"/>
|
<TextField fx:id="name" prefHeight="25.0" prefWidth="308.0" />
|
||||||
<Button mnemonicParsing="false" text="搜索" fx:id="search"/>
|
<Button fx:id="search" mnemonicParsing="false" prefHeight="25.0" prefWidth="75.0" text="搜索" />
|
||||||
|
<Button fx:id="downloading" mnemonicParsing="false" prefHeight="25.0" prefWidth="90.0" text="下载" />
|
||||||
</children>
|
</children>
|
||||||
</HBox>
|
</HBox>
|
||||||
<TabPane fx:id="tabPane" layoutX="26.0" layoutY="150.0" prefHeight="473.0" prefWidth="1145.0" tabClosingPolicy="UNAVAILABLE"
|
<TabPane fx:id="tabPane" layoutX="26.0" layoutY="150.0" prefHeight="473.0" prefWidth="1145.0" tabClosingPolicy="UNAVAILABLE" AnchorPane.bottomAnchor="26.0" AnchorPane.leftAnchor="26.0" AnchorPane.rightAnchor="29.0" AnchorPane.topAnchor="150.0">
|
||||||
AnchorPane.bottomAnchor="26.0" AnchorPane.leftAnchor="26.0" AnchorPane.rightAnchor="29.0"
|
|
||||||
AnchorPane.topAnchor="150.0">
|
|
||||||
<tabs>
|
<tabs>
|
||||||
<Tab text="网易云音乐" fx:id="">
|
<Tab fx:id="" text="网易云音乐">
|
||||||
<content>
|
<content>
|
||||||
<AnchorPane prefHeight="171.0" prefWidth="371.0">
|
<AnchorPane prefHeight="171.0" prefWidth="371.0">
|
||||||
<children>
|
<children>
|
||||||
<TableView fx:id="wangyiyun_music_table_view" layoutX="8.0" layoutY="7.0" prefHeight="200.0" prefWidth="200.0"
|
<TableView fx:id="wangyiyun_music_table_view" layoutX="8.0" layoutY="7.0" prefHeight="200.0" prefWidth="200.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||||
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
|
|
||||||
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
|
||||||
</TableView>
|
</TableView>
|
||||||
</children>
|
</children>
|
||||||
</AnchorPane>
|
</AnchorPane>
|
||||||
|
|
@ -46,9 +40,7 @@
|
||||||
<content>
|
<content>
|
||||||
<AnchorPane prefHeight="171.0" prefWidth="371.0">
|
<AnchorPane prefHeight="171.0" prefWidth="371.0">
|
||||||
<children>
|
<children>
|
||||||
<TableView fx:id="QQ_music_table_view" layoutX="8.0" layoutY="7.0" prefHeight="200.0" prefWidth="200.0"
|
<TableView fx:id="QQ_music_table_view" layoutX="8.0" layoutY="7.0" prefHeight="200.0" prefWidth="200.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||||
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
|
|
||||||
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
|
||||||
</TableView>
|
</TableView>
|
||||||
</children>
|
</children>
|
||||||
</AnchorPane>
|
</AnchorPane>
|
||||||
|
|
@ -59,9 +51,7 @@
|
||||||
<content>
|
<content>
|
||||||
<AnchorPane prefHeight="171.0" prefWidth="371.0">
|
<AnchorPane prefHeight="171.0" prefWidth="371.0">
|
||||||
<children>
|
<children>
|
||||||
<TableView fx:id="kugou_music_table_view" layoutX="8.0" layoutY="7.0" prefHeight="200.0" prefWidth="200.0"
|
<TableView fx:id="kugou_music_table_view" layoutX="8.0" layoutY="7.0" prefHeight="200.0" prefWidth="200.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||||
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
|
|
||||||
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
|
||||||
</TableView>
|
</TableView>
|
||||||
</children>
|
</children>
|
||||||
</AnchorPane>
|
</AnchorPane>
|
||||||
|
|
@ -73,9 +63,7 @@
|
||||||
<content>
|
<content>
|
||||||
<AnchorPane prefHeight="171.0" prefWidth="371.0">
|
<AnchorPane prefHeight="171.0" prefWidth="371.0">
|
||||||
<children>
|
<children>
|
||||||
<TableView fx:id="kuwo_music_table_view" layoutX="8.0" layoutY="7.0" prefHeight="200.0" prefWidth="200.0"
|
<TableView fx:id="kuwo_music_table_view" layoutX="8.0" layoutY="7.0" prefHeight="200.0" prefWidth="200.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||||
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
|
|
||||||
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
|
||||||
</TableView>
|
</TableView>
|
||||||
</children>
|
</children>
|
||||||
</AnchorPane>
|
</AnchorPane>
|
||||||
|
|
@ -87,9 +75,7 @@
|
||||||
<content>
|
<content>
|
||||||
<AnchorPane prefHeight="171.0" prefWidth="371.0">
|
<AnchorPane prefHeight="171.0" prefWidth="371.0">
|
||||||
<children>
|
<children>
|
||||||
<TableView fx:id="migu_music_table_view" layoutX="8.0" layoutY="7.0" prefHeight="200.0" prefWidth="200.0"
|
<TableView fx:id="migu_music_table_view" layoutX="8.0" layoutY="7.0" prefHeight="200.0" prefWidth="200.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||||
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
|
|
||||||
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
|
||||||
</TableView>
|
</TableView>
|
||||||
</children>
|
</children>
|
||||||
</AnchorPane>
|
</AnchorPane>
|
||||||
|
|
@ -100,9 +86,7 @@
|
||||||
<content>
|
<content>
|
||||||
<AnchorPane prefHeight="171.0" prefWidth="371.0">
|
<AnchorPane prefHeight="171.0" prefWidth="371.0">
|
||||||
<children>
|
<children>
|
||||||
<TableView fx:id="qianqian_music_table_view" layoutX="8.0" layoutY="7.0" prefHeight="200.0" prefWidth="200.0"
|
<TableView fx:id="qianqian_music_table_view" layoutX="8.0" layoutY="7.0" prefHeight="200.0" prefWidth="200.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||||
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
|
|
||||||
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
|
||||||
</TableView>
|
</TableView>
|
||||||
</children>
|
</children>
|
||||||
</AnchorPane>
|
</AnchorPane>
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,4 @@
|
||||||
/* eslint-disable consistent-return */
|
function search(url) {
|
||||||
/* eslint-disable no-unused-vars */
|
|
||||||
/* eslint-disable no-use-before-define */
|
|
||||||
/* global getParameterByName cookieRemove async forge */
|
|
||||||
class migu {
|
|
||||||
|
|
||||||
static search(url) {
|
|
||||||
const keyword = getParameterByName('keywords', url);
|
const keyword = getParameterByName('keywords', url);
|
||||||
const curpage = getParameterByName('curpage', url);
|
const curpage = getParameterByName('curpage', url);
|
||||||
const searchType = getParameterByName('type', url);
|
const searchType = getParameterByName('type', url);
|
||||||
|
|
@ -89,7 +83,7 @@ class migu {
|
||||||
headers,
|
headers,
|
||||||
})
|
})
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
const { data } = response;
|
const {data} = response;
|
||||||
let result = [];
|
let result = [];
|
||||||
let total = 0;
|
let total = 0;
|
||||||
if (searchType === '0') {
|
if (searchType === '0') {
|
||||||
|
|
@ -124,14 +118,14 @@ class migu {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://abhishekdutta.org/blog/standalone_uuid_generator_in_javascript.html
|
// https://abhishekdutta.org/blog/standalone_uuid_generator_in_javascript.html
|
||||||
static uuid() {
|
function uuid() {
|
||||||
const temp_url = URL.createObjectURL(new Blob());
|
const temp_url = URL.createObjectURL(new Blob());
|
||||||
const strTemp = temp_url.toString();
|
const strTemp = temp_url.toString();
|
||||||
URL.revokeObjectURL(temp_url);
|
URL.revokeObjectURL(temp_url);
|
||||||
return strTemp.substr(strTemp.lastIndexOf('/') + 1); // remove prefix (e.g. blob:null/, blob:www.test.com/, ...)
|
return strTemp.substr(strTemp.lastIndexOf('/') + 1);
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue