mirror of
https://github.com/qaiu/netdisk-fast-download.git
synced 2025-12-16 20:33:03 +00:00
add 118, 微雨云
This commit is contained in:
@@ -6,6 +6,7 @@ import cn.qaiu.vx.core.verticle.ReverseProxyVerticle;
|
||||
import cn.qaiu.vx.core.verticle.RouterVerticle;
|
||||
import cn.qaiu.vx.core.verticle.ServiceVerticle;
|
||||
import io.vertx.core.*;
|
||||
import io.vertx.core.dns.AddressResolverOptions;
|
||||
import io.vertx.core.impl.launcher.commands.VersionCommand;
|
||||
import io.vertx.core.json.JsonObject;
|
||||
import io.vertx.core.shareddata.LocalMap;
|
||||
@@ -121,6 +122,10 @@ public final class Deploy {
|
||||
var vertxOptions = vertxConfigELPS == 0 ?
|
||||
new VertxOptions() : new VertxOptions(vertxConfig);
|
||||
|
||||
vertxOptions.setAddressResolverOptions(
|
||||
new AddressResolverOptions().
|
||||
addServer("114.114.114.114").
|
||||
addServer("114.114.115.115"));
|
||||
LOGGER.info("vertxConfigEventLoopPoolSize: {}, eventLoopPoolSize: {}, workerPoolSize: {}", vertxConfigELPS,
|
||||
vertxOptions.getEventLoopPoolSize(),
|
||||
vertxOptions.getWorkerPoolSize());
|
||||
|
||||
@@ -4,4 +4,8 @@ import io.vertx.core.Future;
|
||||
|
||||
public interface IPanTool {
|
||||
Future<String> parse();
|
||||
|
||||
default String parseSync() {
|
||||
return parse().toCompletionStage().toCompletableFuture().join();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,8 @@ public abstract class PanBase implements IPanTool {
|
||||
/**
|
||||
* Http client
|
||||
*/
|
||||
protected WebClient client = WebClient.create(WebClientVertxInit.get());
|
||||
protected WebClient client = WebClient.create(WebClientVertxInit.get(),
|
||||
new WebClientOptions().setUserAgentEnabled(false));
|
||||
|
||||
/**
|
||||
* Http client session (会话管理, 带cookie请求)
|
||||
@@ -103,6 +104,10 @@ public abstract class PanBase implements IPanTool {
|
||||
}
|
||||
}
|
||||
|
||||
protected void fail() {
|
||||
fail("");
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成失败Future的处理器
|
||||
*
|
||||
@@ -113,6 +118,10 @@ public abstract class PanBase implements IPanTool {
|
||||
return t -> fail(shareLinkInfo.getPanName() + "-" + shareLinkInfo.getType() + " - 请求异常 {}: -> {}", errorMsg, t.fillInStackTrace());
|
||||
}
|
||||
|
||||
protected Handler<Throwable> handleFail() {
|
||||
return handleFail("");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* bodyAsJsonObject的封装, 会自动处理异常
|
||||
|
||||
@@ -83,6 +83,16 @@ public enum PanDomainTemplate {
|
||||
compile("https://474b\\.com/file/(?<KEY>.+)"),
|
||||
"https://474b.com/file/{shareKey}",
|
||||
CtTool.class),
|
||||
// https://xxx.118pan.com/bxxx
|
||||
P118("118网盘",
|
||||
compile("https://((.*)\\.)?118pan\\.com/b(?<KEY>.+)"),
|
||||
"https://qaiu.118pan.com/b{shareKey}",
|
||||
P118Tool.class),
|
||||
// https://www.vyuyun.com/s/QMa6ie?password=I4KG7H
|
||||
PVYY("微雨云存储",
|
||||
compile("https://www\\.vyuyun\\.com/s/(?<KEY>[a-zA-Z0-9-]+)(\\?password=.*)?"),
|
||||
"https://www.vyuyun.com/s/{shareKey}",
|
||||
PvyyTool.class),
|
||||
|
||||
// =====================音乐类解析 分享链接标志->MxxS (单歌曲/普通音质)==========================
|
||||
// http://163cn.tv/xxx
|
||||
|
||||
48
parser/src/main/java/cn/qaiu/parser/impl/P118Tool.java
Normal file
48
parser/src/main/java/cn/qaiu/parser/impl/P118Tool.java
Normal file
@@ -0,0 +1,48 @@
|
||||
package cn.qaiu.parser.impl;
|
||||
|
||||
import cn.qaiu.entity.ShareLinkInfo;
|
||||
import cn.qaiu.parser.PanBase;
|
||||
import io.vertx.core.Future;
|
||||
import io.vertx.core.buffer.Buffer;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* 118网盘解析
|
||||
*/
|
||||
public class P118Tool extends PanBase {
|
||||
|
||||
private static final String API_URL_PREFIX = "https://qaiu.118pan.com/ajax.php";
|
||||
|
||||
// private static final String
|
||||
|
||||
public P118Tool(ShareLinkInfo shareLinkInfo) {
|
||||
super(shareLinkInfo);
|
||||
}
|
||||
|
||||
public Future<String> parse() {
|
||||
|
||||
client.postAbs(API_URL_PREFIX)
|
||||
.putHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8")
|
||||
.sendBuffer(Buffer.buffer("action=load_down_addr1&file_id=" + shareLinkInfo.getShareKey()))
|
||||
.onSuccess(res -> {
|
||||
System.out.println(res.headers());
|
||||
Pattern compile = Pattern.compile("href=\"([^\"]+)\"");
|
||||
Matcher matcher = compile.matcher(res.bodyAsString());
|
||||
if (matcher.find()) {
|
||||
System.out.println(matcher.group(1));
|
||||
complete(matcher.group(1));
|
||||
} else {
|
||||
fail();
|
||||
}
|
||||
}).onFailure(handleFail(""));
|
||||
return future();
|
||||
}
|
||||
|
||||
// public static void main(String[] args) {
|
||||
// String s = new P118Tool(ShareLinkInfo.newBuilder().shareUrl("https://xiguage.118pan.com/b11848261").shareKey(
|
||||
// "11848261").build()).parseSync();
|
||||
// System.out.println(s);
|
||||
// }
|
||||
}
|
||||
51
parser/src/main/java/cn/qaiu/parser/impl/PvyyTool.java
Normal file
51
parser/src/main/java/cn/qaiu/parser/impl/PvyyTool.java
Normal file
@@ -0,0 +1,51 @@
|
||||
package cn.qaiu.parser.impl;
|
||||
|
||||
import cn.qaiu.entity.ShareLinkInfo;
|
||||
import cn.qaiu.parser.PanBase;
|
||||
import io.vertx.core.Future;
|
||||
import io.vertx.uritemplate.UriTemplate;
|
||||
|
||||
/**
|
||||
* 微雨云
|
||||
*/
|
||||
public class PvyyTool extends PanBase {
|
||||
private static final String API_URL_PREFIX1 = "https://www.vyuyun.com/apiv1/share/file/{key}?password={pwd}";
|
||||
private static final String API_URL_PREFIX2 = "https://www.vyuyun.com/apiv1/share/getShareDownUrl/{key}/{id}?password={pwd}";
|
||||
|
||||
public PvyyTool(ShareLinkInfo shareLinkInfo) {
|
||||
super(shareLinkInfo);
|
||||
}
|
||||
|
||||
public Future<String> parse() {
|
||||
//
|
||||
client.getAbs(UriTemplate.of(API_URL_PREFIX1))
|
||||
.setTemplateParam("key", shareLinkInfo.getShareKey())
|
||||
.setTemplateParam("pwd", shareLinkInfo.getSharePassword())
|
||||
.putHeader("referer", "https://www.vyuyun.com")
|
||||
.send().onSuccess(res -> {
|
||||
try {
|
||||
String id = asJson(res).getJsonObject("data").getJsonObject("data").getString("id");
|
||||
|
||||
client.getAbs(UriTemplate.of(API_URL_PREFIX2))
|
||||
.setTemplateParam("key", shareLinkInfo.getShareKey())
|
||||
.setTemplateParam("pwd", shareLinkInfo.getSharePassword())
|
||||
.setTemplateParam("id", id)
|
||||
.putHeader("referer", "https://www.vyuyun.com")
|
||||
.send().onSuccess(res2 -> {
|
||||
try {
|
||||
// data->downInfo->url
|
||||
String url =
|
||||
asJson(res2).getJsonObject("data").getJsonObject("downInfo").getString("url");
|
||||
complete(url);
|
||||
} catch (Exception ignored) {
|
||||
fail(asJson(res2).encodePrettily());
|
||||
}
|
||||
});
|
||||
} catch (Exception ignored) {
|
||||
fail(asJson(res).encodePrettily());
|
||||
}
|
||||
});
|
||||
|
||||
return future();
|
||||
}
|
||||
}
|
||||
@@ -10,13 +10,22 @@ public class TestRegex {
|
||||
@Test
|
||||
public void regexYFC() {
|
||||
String html = """
|
||||
https://www.kugou.com/mixsong/9q98o5b9.html
|
||||
true|
|
||||
<div class="load" id="go"><a
|
||||
href="https://nsub2d3.118pan.com/dl.php?YzljNGFnOHFabWpsdzVXNUhyOXNiQ0ZYMHEzUjFoQ0R6MExCckdKZmRQL1RXbERPSTUwS0xlZkUvdmN5dGNqTHhCNDJVZURFekthV0tROHNINXdNRkZYUXB5aGQ5TEdXeTgrNkc1TkZwOWhzYVdpak83dEZleWxpYnloc0c1Ky9wbVBSZ0xiSHo5aTBnVVpCRmpyMGFBRERjcldtc0FnbS9vMnd3ZGRHWU4zYTNzNncwbk56UEtOVWhFeGIvWlM1aWZLQjlaTjB3b2V0cGVrb2lpQ0x3U0dtQkJqd2plWk1yeU1mZG1oNXpRYUJpYmFhZVgvWFZScThsTFhmU1ZKRW9UT3haVHFMVGVRTUhR"
|
||||
onclick="down_process2('1228264');" target="_blank"><span class="txt">极速下载</span></a><a
|
||||
href="https://nsub2t3.118pan.com/dl.php?YzljNGFnOHFabWpsdzVXNUhyOXNiQ0ZYMHEzUjFoQ0R6MExCckdKZmRQL1RXbERPSTUwS0xlZkUvdmN5dGNqTHhCNDJVZURFekthV0tROHNINXdNRkZYUXB5aGQ5TEdXeTgrNkc1TkZwOWhzYVdpak83dEZleWxpYnloc0c1Ky9wbVBSZ0xiSHo5aTBnVVpCRmpyMGFBRERjcldtc0FnbS9vMnd3ZGRHWU4zYTNzNncwbk56UEtOVWhFeGIvWlM1aWZLQjlaTjB3b2V0cGVrb2lpQ0x3U0dtQkJqd2plWk1yeU1mZG1oNXpRYUJpYmFhZVgvWFZScThsTFhmU1ZKRW9UT3haVHFMVGVRTUhR"
|
||||
onclick="down_process2('1228264');" target="_blank"><span class="txt txtc">电信下载</span></a><a
|
||||
href="https://nsub2u3.118pan.com/dl.php?YzljNGFnOHFabWpsdzVXNUhyOXNiQ0ZYMHEzUjFoQ0R6MExCckdKZmRQL1RXbERPSTUwS0xlZkUvdmN5dGNqTHhCNDJVZURFekthV0tROHNINXdNRkZYUXB5aGQ5TEdXeTgrNkc1TkZwOWhzYVdpak83dEZleWxpYnloc0c1Ky9wbVBSZ0xiSHo5aTBnVVpCRmpyMGFBRERjcldtc0FnbS9vMnd3ZGRHWU4zYTNzNncwbk56UEtOVWhFeGIvWlM1aWZLQjlaTjB3b2V0cGVrb2lpQ0x3U0dtQkJqd2plWk1yeU1mZG1oNXpRYUJpYmFhZVgvWFZScThsTFhmU1ZKRW9UT3haVHFMVGVRTUhR"
|
||||
onclick="down_process2('1228264');" target="_blank"><span class="txt">联通下载</span></a><a
|
||||
href="https://nsub2d3.118pan.com/dl.php?YzljNGFnOHFabWpsdzVXNUhyOXNiQ0ZYMHEzUjFoQ0R6MExCckdKZmRQL1RXbERPSTUwS0xlZkUvdmN5dGNqTHhCNDJVZURFekthV0tROHNINXdNRkZYUXB5aGQ5TEdXeTgrNkc1TkZwOWhzYVdpak83dEZleWxpYnloc0c1Ky9wbVBSZ0xiSHo5aTBnVVpCRmpyMGFBRERjcldtc0FnbS9vMnd3ZGRHWU4zYTNzNncwbk56UEtOVWhFeGIvWlM1aWZLQjlaTjB3b2V0cGVrb2lpQ0x3U0dtQkJqd2plWk1yeU1mZG1oNXpRYUJpYmFhZVgvWFZScThsTFhmU1ZKRW9UT3haVHFMVGVRTUhR"
|
||||
onclick="down_process2('1228264');" target="_blank"><span class="txt txtc">普通下载</span></a></div>
|
||||
""";
|
||||
|
||||
Pattern compile = Pattern.compile("https://(.+)\\.kugou\\.com/mixsong/(?<KEY>.+).html");
|
||||
Pattern compile = Pattern.compile("href=\"([^\"]+)\"");
|
||||
Matcher matcher = compile.matcher(html);
|
||||
if (matcher.find()) {
|
||||
System.out.println(matcher.group(0));
|
||||
// System.out.println(matcher.group(0));
|
||||
System.out.println(matcher.group(1));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -312,13 +312,19 @@ export default {
|
||||
this.$message.error(response.data.msg)
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
async getPaste() {
|
||||
const text = await navigator.clipboard.readText();
|
||||
console.log('获取到的文本内容是:', text)
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.getLinkInfo = `${this.baseAPI}/v2/linkInfo`
|
||||
this.getLink = `${this.baseAPI}/json/parser`
|
||||
this.getLink = `${this.baseAPI}/json/parser`
|
||||
this.getInfo()
|
||||
}
|
||||
this.getPaste()
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -74,5 +74,61 @@ GET http://127.0.0.1:6401/parser?url=https://blog.qaiu.top/s/nLNsQ1
|
||||
|
||||
###
|
||||
# @no-redirect
|
||||
GET http://127.0.0.1:6401/parser?url=https://pan.seeoss.com/s/nLNsQ1
|
||||
GET http://127.0.0.1:6401/parser?url=https://pan.baidu.com/s/1o7ZPmAecYJ4rsxibyARyeg?pwd=QAIU
|
||||
|
||||
###
|
||||
https://pan.baidu.com/s/1o7ZPmAecYJ4rsxibyARyeg?pwd=QAIU
|
||||
|
||||
|
||||
|
||||
### 微雨云存储 0. 带密码 获取分享ID: QMa6ie
|
||||
https://www.vyuyun.com/s/QMa6ie?password=I4KG7H
|
||||
### 微雨云存储 0. 不带密码 获取分享ID: jemOTl
|
||||
https://www.vyuyun.com/s/jemOTl?password=
|
||||
|
||||
### 微雨云存储 1. 传入jemOTl 获取文件ID json: data->id
|
||||
https://www.vyuyun.com/apiv1/share/file/jemOTl?password=
|
||||
### 微雨云存储 1. 传入jemOTl 获取文件ID json: data->id
|
||||
https://www.vyuyun.com/apiv1/share/file/QMa6ie?password=I4KG7H
|
||||
|
||||
### 微雨云存储 2. 获取文件直链 json: data->downInfo->url
|
||||
https://www.vyuyun.com/apiv1/share/getShareDownUrl/jemOTl/0BEmf4?password=
|
||||
referer: https://www.vyuyun.com
|
||||
|
||||
|
||||
### 下载直链 无需请求头 11:00
|
||||
#@no-cookie-jar
|
||||
https://down2.bilnn.top/uploads/11283/306bdccd233ffd2c.jar?filename=C400003mAan70zUy5O+%282%29.m4a&mime=audio%2Fx-m4a&verify=1729911697-SLZtEHXB4TM*ze1j31WMyNA**p743DY*GN2sajUx5w*2mM**
|
||||
|
||||
|
||||
### 118网盘 https://qaiu.118pan.com/b1228264
|
||||
#密码:qaiu
|
||||
https://qaiu.118pan.com/b1228264
|
||||
|
||||
###
|
||||
https://xiguage.118pan.com/b1186280
|
||||
|
||||
### 118 b1228264->1228264
|
||||
POST https://qaiu.118pan.com/ajax.php
|
||||
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
|
||||
|
||||
action=load_down_addr1&file_id=1228264
|
||||
|
||||
### 118 b1186280->1186280
|
||||
POST https://qaiu.118pan.com/ajax.php
|
||||
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
|
||||
|
||||
action=load_down_addr1&file_id=1186280
|
||||
|
||||
###
|
||||
#@no-redirect
|
||||
https://nsub2d3.118pan.com/dl.php?M2E0NFVEMGM4YnFOenc2dHI5MGp1MEV3MUhvbW1sYXhnUkxLbHg3clhkMDhld24vZFBpazhlNTVTKytEY1IvRUhsWUZxT1lGYWNZUmtaNU9KMnNDQll3NzNYbFVUVU1Uc09CUUQrSHVyajR4RmpSczdsYS8zVUpmNzdkTlJHSG9FMnpNcEJuWnhnVCtiUVBoelE4S1c3WW8xczI2bEZsb3hTSlYvdis4dTk0My9TS2lKbzNLcXpLUmVNN1NPMlhHaWc4Tlo3TVlKQ3g3OHdOWW9mMzhMVk9tRThWdVBzZU1XZHFzTVR5cDE1aEFiU2o4ZkZ1SThwZXRNdGdPQmtOdEJvejRiS0pmMTFNS3Bn
|
||||
|
||||
|
||||
### https://qscbm187531.118pan.com/b1102853
|
||||
#@no-redirect
|
||||
POST https://qscbm187531.118pan.com/ajax.php
|
||||
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -239,3 +239,11 @@ GET http://127.0.0.1:6401/parser?url=https://kuwo.cn/play_detail/395500809
|
||||
http://127.0.0.1:6401/n1/statisticsInfo
|
||||
|
||||
|
||||
### 118pan PASS
|
||||
# @no-redirect
|
||||
GET http://127.0.0.1:6400/parser?url=https://qscbm187531.118pan.com/b1102853
|
||||
|
||||
|
||||
### vyuyun PASS
|
||||
# @no-redirect
|
||||
GET http://127.0.0.1:6400/parser?url=https://www.vyuyun.com/s/QMa6ie?password=I4KG7H&pwd=I4KG7H
|
||||
|
||||
Reference in New Issue
Block a user