Compare commits
3 Commits
483b279353
...
71778b0bd3
Author | SHA1 | Date |
---|---|---|
|
71778b0bd3 | |
|
446e3be515 | |
|
eb4fa1cdfe |
|
@ -0,0 +1,8 @@
|
||||||
|
FROM openjdk:25
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
ADD lingyin-api-1.0.jar .
|
||||||
|
|
||||||
|
ENV java_opts "-server -Xmx100m -XX:+UseCompactObjectHeaders"
|
||||||
|
|
||||||
|
RUN java -jar $java_opts lingyin-api-1.0.jar
|
|
@ -0,0 +1,12 @@
|
||||||
|
version: '3.8'
|
||||||
|
services:
|
||||||
|
lingyin-api:
|
||||||
|
container_name: lingyin-api
|
||||||
|
environment:
|
||||||
|
- JAVA_OPTS=-server -Xmx100m -XX:+UseCompactObjectHeaders
|
||||||
|
- SECURE_LOGIN=
|
||||||
|
- SECURE_UID=
|
||||||
|
- SECURE_PASS=
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- 46578:46578
|
17
pom.xml
17
pom.xml
|
@ -7,6 +7,7 @@
|
||||||
<groupId>com.dengqn.app</groupId>
|
<groupId>com.dengqn.app</groupId>
|
||||||
<artifactId>lingyin-api</artifactId>
|
<artifactId>lingyin-api</artifactId>
|
||||||
<version>1.0</version>
|
<version>1.0</version>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<maven.compiler.source>25</maven.compiler.source>
|
<maven.compiler.source>25</maven.compiler.source>
|
||||||
|
@ -47,12 +48,20 @@
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
<version>3.5.5</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>25</source>
|
<mainClass>com.dengqn.app.lingyinapi.Main</mainClass>
|
||||||
<target>25</target>
|
|
||||||
</configuration>
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>repackage</id>
|
||||||
|
<goals>
|
||||||
|
<goal>repackage</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
|
@ -53,7 +53,7 @@ public class Seed {
|
||||||
String url = "https://pt.soulvoice.club/special.php?inclbookmarked=%s&incldead=%s&spstate=%s&page=%s&search=%s"
|
String url = "https://pt.soulvoice.club/special.php?inclbookmarked=%s&incldead=%s&spstate=%s&page=%s&search=%s"
|
||||||
.formatted(inclbookmarked, incldead, spstate, page, search);
|
.formatted(inclbookmarked, incldead, spstate, page, search);
|
||||||
String html = HttpTool.getHTML(url, okHttpClient);
|
String html = HttpTool.getHTML(url, okHttpClient);
|
||||||
log.info("html:{}", html);
|
// log.info("html:{}", html);
|
||||||
Document doc = Jsoup.parse(html);
|
Document doc = Jsoup.parse(html);
|
||||||
List<SeedListItem> listItem = HtmlTool.getSeedListItem(doc);
|
List<SeedListItem> listItem = HtmlTool.getSeedListItem(doc);
|
||||||
return ResponseEntity.ok(
|
return ResponseEntity.ok(
|
||||||
|
|
|
@ -33,6 +33,9 @@ public class HtmlTool {
|
||||||
* 标题部分
|
* 标题部分
|
||||||
*/
|
*/
|
||||||
Element torrentNames = tr.getElementsByTag("table").first();
|
Element torrentNames = tr.getElementsByTag("table").first();
|
||||||
|
if (torrentNames == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
Elements seedNames = torrentNames.getElementsByTag("td");
|
Elements seedNames = torrentNames.getElementsByTag("td");
|
||||||
String seedCover = seedNames.get(0).getElementsByTag("img").first().attr("data-src");
|
String seedCover = seedNames.get(0).getElementsByTag("img").first().attr("data-src");
|
||||||
String seedName = seedNames.get(1).getElementsByTag("a").first().attr("title");
|
String seedName = seedNames.get(1).getElementsByTag("a").first().attr("title");
|
||||||
|
|
Loading…
Reference in New Issue