去除前端文件,交给nginx托管;无法在线看时返回报错;

This commit is contained in:
chuzhongzai 2023-12-29 15:39:26 +08:00
parent 6f0049442f
commit fd016c7809
18 changed files with 24 additions and 362 deletions

View File

@ -331,6 +331,8 @@ public class GalleryManageService {
gidToKey.setGid(gid);
gidToKey.setKey(url.split("/")[5].strip());
ArrayList<ImageKeyCache> imageKeyCaches = GalleryUtil.parseImageKeys(url);
if(imageKeyCaches == null)
return response.failure("该本子已下架或已被删除").toJSONString();
gidToKey.setPages(imageKeyCaches.size());
imageCacheMapper.insertGidToKey(gidToKey);
for (ImageKeyCache imageKeyCache : imageKeyCaches)

View File

@ -154,7 +154,11 @@ public class GalleryUtil {
HashMap<String, String> header = new HashMap<>();
header.put("Referer", url);
String content = requests(mpvUrl, "get", header, null);
if(content.trim().isEmpty())
return null;
Document document = Jsoup.parse(content);
if(document.select("body > script").size() < 2)
return null;
Element script = document.select("body > script").get(1);
String[] scripts = script.html().split("\n");
ArrayList<ImageKeyCache> imageKeyCaches = new ArrayList<>();
@ -310,9 +314,8 @@ public class GalleryUtil {
String str;
while((str = reader.readLine()) != null)
stringBuilder.append(str).append("\n");
}
else{
System.out.println(statusCode);
} else{
System.out.println(url + ":" + statusCode);
}
httpClient.close();

Binary file not shown.

View File

@ -25,19 +25,19 @@ spring:
enabled: true
personal-service:
StoragePath: /storage/
gallery-manage-service:
target-path: /root/gallery/
cache-size: 100
remote-service:
ip: 5.255.110.45
local-service:
DouNaiClash: https://aaaa.gay/link/X7zEqkIx5gtIGugO?client=clashmeta
DouNaiV2ray: https://aaaa.gay/link/X7zEqkIx5gtIGugO?client=v2
bot:
token: 5222939329:AAHa6l9ZuVVdNSDLPI_H-c8O_VgeOEw5plA
#personal-service:
# StoragePath: /storage/
#
#gallery-manage-service:
# target-path: /root/gallery/
# cache-size: 100
#
#remote-service:
# ip: 5.255.110.45
#
#local-service:
# DouNaiClash: https://aaaa.gay/link/X7zEqkIx5gtIGugO?client=clashmeta
# DouNaiV2ray: https://aaaa.gay/link/X7zEqkIx5gtIGugO?client=v2
#
#bot:
# token: 5222939329:AAHa6l9ZuVVdNSDLPI_H-c8O_VgeOEw5plA

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -1,16 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="icon" href="/favicon.ico" />
<link href="/reset.css" type="text/css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Lion</title>
<script type="module" src="/asserts/index/index.js"></script>
<link rel="stylesheet" href="/asserts/index/index.css">
</head>
<body>
<div id="app"></div>
</body>
</html>

View File

@ -1,16 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"/>
<title>Lion</title>
<meta name="apple-mobile-web-app-capable" content="yes">
<script type="module" crossorigin src="/asserts/mobile/index.js"></script>
<link rel="stylesheet" href="/asserts/mobile/index.css">
</head>
<body>
<div id="app"></div>
</body>
</html>

View File

@ -1,42 +0,0 @@
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}

View File

@ -1,14 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Lion</title>
<script type="module" crossorigin src="/asserts/self/index.js"></script>
<link rel="stylesheet" href="/asserts/self/index.css">
</head>
<body>
<div id="app"></div>
</body>
</html>

View File

@ -1,15 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Personal</title>
<script type="module" crossorigin src="/asserts/self/mobile.js"></script>
<link rel="stylesheet" href="/asserts/self/mobile.css">
</head>
<body>
<div id="app"></div>
</body>
</html>