Skip to content

Commit

Permalink
修复TMDB年份获取错误
Browse files Browse the repository at this point in the history
  • Loading branch information
wushuo894 committed Nov 7, 2024
1 parent 0a649e2 commit 9617970
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion UPDATE.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
修复重命名包含 "/" 导致多级目录的问题
修复TMDB年份获取错误
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>ani.rss</groupId>
<artifactId>ani-rss</artifactId>
<version>1.1.178</version>
<version>1.1.179</version>

<properties>
<maven.compiler.source>11</maven.compiler.source>
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/ani/rss/util/TmdbUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public synchronized static String getName(String name) {
String finalName = name;
themoviedbName = HttpReq.get("https://www.themoviedb.org/search", true)
.form("query", name)
.cookie("")
.header("accept-language", acceptLanguage)
.thenFunction(res -> {
org.jsoup.nodes.Document document = Jsoup.parse(res.body());
Expand All @@ -62,7 +63,7 @@ public synchronized static String getName(String name) {
}
Element releaseDate = document.selectFirst(".release_date");
if (Objects.nonNull(releaseDate) && StrUtil.isNotBlank(year.get())) {
String s = "((19|20)\\d{2}) 年 (\\d{2}) 月 (\\d{2}) 日";
String s = "((19|20)\\d{2}) 年";
String text = releaseDate.text();
if (ReUtil.contains(s, text)) {
year.set(ReUtil.get(s, text, 1));
Expand Down

0 comments on commit 9617970

Please sign in to comment.