Skip to content

Commit

Permalink
🎉 Release v1.6.2
Browse files Browse the repository at this point in the history
  • Loading branch information
freeok committed Nov 19, 2024
1 parent 232a145 commit 688f1ae
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
with:
distribution: 'corretto'
java-version: '17'
# 启用 Maven 依赖缓存,以提高构建速度
cache: 'maven'
- name: Build executable
shell: powershell
run: |
Expand Down
10 changes: 6 additions & 4 deletions input/readme.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
Windows 用户
运行 exe 文件启动

macOS
macOS 用户
运行 macos-run.sh 启动

Linux 用户
运行 linux-run.sh 启动

提示:
1. config.ini 是配置文件,下载格式在此修改,保存后重新运行 exe 才能生效
2. 请按照要求输入内容,若不按要求输入则无法正常工作
3. 若书源失效,请 New issue (https://github.com/freeok/so-novel/issues)
1. 将终端窗口最大化,使用体验更佳
2. config.ini 是配置文件,下载格式在此修改,保存后重新运行 exe 生效
3. 按 Tab 键选择功能(Tab 可连按),然后按 Enter 键确认执行
4. 请按照要求输入内容,若不按要求输入则无法正常工作
5. 若书源失效,请 New issue (https://github.com/freeok/so-novel/issues)

最新版下载地址:https://github.com/freeok/so-novel/releases
8 changes: 5 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.pcdd</groupId>
<artifactId>so-novel</artifactId>
<version>1.6.1</version>
<version>1.6.2</version>
<packaging>jar</packaging>

<name>so-novel</name>
Expand All @@ -21,8 +21,10 @@
<properties>
<java.version>17</java.version>
<jline.version>3.27.1</jline.version>
<!-- 相当于 source + target -->
<maven.compiler.release>${java.version}</maven.compiler.release>
<!-- 相当于 source + target,这种写法要求 Maven 3.6.0+、JDK 9+。https://maven.apache.org/plugins/maven-compiler-plugin/examples/set-compiler-release.html -->
<!-- <maven.compiler.release>${java.version}</maven.compiler.release> -->
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/pcdd/sonovel/core/Crawler.java
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ private static String generatePath(Chapter chapter) {
// Windows 文件名非法字符替换
+ "_" + chapter.getTitle().replaceAll("[\\\\/:*?<>]", "")
+ "." + extName;
default -> throw new IllegalStateException("不支持的下载格式: " + EXT_NAME);
default -> throw new IllegalStateException("暂不支持的下载格式: " + EXT_NAME);
};
}

Expand Down
8 changes: 7 additions & 1 deletion src/main/java/com/pcdd/sonovel/parse/BookParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,13 @@ public static String replaceCover(Book book) {

for (Element e : elements) {
String name = e.select(".book-mid-info > .book-info-title > a").text();
String author = e.select(".book-mid-info > .author > i").text();
// 起点作者
String author1 = e.select(".book-mid-info > .author > .name").text();
// 非起点作者
String author2 = e.select(".book-mid-info > .author > i").text();
String author = author1.isEmpty() ? author2 : author1;

System.out.println(name + " " + author);

if (book.getBookName().equals(name) && book.getAuthor().equals(author)) {
String coverUrl = e.select(".book-img-box > a > img").attr("src");
Expand Down

0 comments on commit 688f1ae

Please sign in to comment.