mirror of
https://github.com/dev-claw/vripper-project.git
synced 2026-08-19 08:35:41 +02:00
Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a8e5dbf5f7 | ||
|
|
70cee5cb17 | ||
|
|
9012cc065e |
@@ -2,14 +2,14 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>tn.mnlr</groupId>
|
||||
<artifactId>vripper</artifactId>
|
||||
<version>3.5.4</version>
|
||||
<groupId>me.vripper</groupId>
|
||||
<artifactId>vripper-parent</artifactId>
|
||||
<version>3.6.0</version>
|
||||
<packaging>pom</packaging>
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.4.5</version>
|
||||
<version>3.5.6</version>
|
||||
<relativePath/>
|
||||
</parent>
|
||||
<modules>
|
||||
|
||||
@@ -30,7 +30,7 @@ process.on("uncaughtException", err => {
|
||||
createWindow = () => {
|
||||
|
||||
if (process.platform === 'win32') {
|
||||
app.setAppUserModelId('tn.mnlr.vripper');
|
||||
app.setAppUserModelId('me.vripper.vripper-app');
|
||||
}
|
||||
|
||||
let icon;
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"name": "vripper-electron",
|
||||
"version": "3.5.4",
|
||||
"version": "3.6.0",
|
||||
"description": "A ripper for vipergirls.to built using web technolgies",
|
||||
"main": "main.js",
|
||||
"author": "death-claw <53543762+death-claw@users.noreply.github.com>",
|
||||
"homepage": "https://github.com/death-claw/vripper-project",
|
||||
"author": "dev-claw",
|
||||
"homepage": "https://github.com/dev-claw/vripper-project",
|
||||
"license": "ISC",
|
||||
"build": {
|
||||
"appId": "tn.mnlr.vripper",
|
||||
"appId": "me.vripper.vripper-app",
|
||||
"productName": "VRipper",
|
||||
"files": [
|
||||
"**/*",
|
||||
|
||||
@@ -4,12 +4,13 @@
|
||||
xmlns="http://maven.apache.org/POM/4.0.0">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>tn.mnlr</groupId>
|
||||
<artifactId>vripper</artifactId>
|
||||
<version>3.5.4</version>
|
||||
<groupId>me.vripper</groupId>
|
||||
<artifactId>vripper-parent</artifactId>
|
||||
<version>3.6.0</version>
|
||||
</parent>
|
||||
<artifactId>vripper-electron</artifactId>
|
||||
<name>vripper-electron</name>
|
||||
<packaging>pom</packaging>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
@@ -28,7 +29,7 @@
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>tn.mnlr</groupId>
|
||||
<groupId>me.vripper</groupId>
|
||||
<artifactId>vripper-server</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>runtime</scope>
|
||||
|
||||
+345
-333
File diff suppressed because it is too large
Load Diff
+25
-4
@@ -3,9 +3,9 @@
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>tn.mnlr</groupId>
|
||||
<artifactId>vripper</artifactId>
|
||||
<version>3.5.4</version>
|
||||
<groupId>me.vripper</groupId>
|
||||
<artifactId>vripper-parent</artifactId>
|
||||
<version>3.6.0</version>
|
||||
</parent>
|
||||
<artifactId>vripper-server</artifactId>
|
||||
<name>vripper-server</name>
|
||||
@@ -55,6 +55,7 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
<version>4.5.14</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.sourceforge.htmlcleaner</groupId>
|
||||
@@ -75,18 +76,33 @@
|
||||
<artifactId>caffeine</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>tn.mnlr</groupId>
|
||||
<groupId>me.vripper</groupId>
|
||||
<artifactId>vripper-ui</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>runtime</scope>
|
||||
<type>pom</type>
|
||||
<classifier>${buildClassifier}</classifier>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.14.0</version>
|
||||
<configuration>
|
||||
<annotationProcessorPaths>
|
||||
<path>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</path>
|
||||
</annotationProcessorPaths>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>3.4.2</version>
|
||||
<configuration>
|
||||
<classifier>${buildClassifier}</classifier>
|
||||
<archive>
|
||||
@@ -112,6 +128,11 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-install-plugin</artifactId>
|
||||
<version>2.5.2</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
||||
+3
-3
@@ -1,12 +1,12 @@
|
||||
package tn.mnlr.vripper;
|
||||
package me.vripper;
|
||||
|
||||
import lombok.Getter;
|
||||
import me.vripper.jpa.repositories.IPostRepository;
|
||||
import me.vripper.services.DataService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.event.ContextRefreshedEvent;
|
||||
import org.springframework.context.event.EventListener;
|
||||
import org.springframework.stereotype.Component;
|
||||
import tn.mnlr.vripper.jpa.repositories.IPostRepository;
|
||||
import tn.mnlr.vripper.services.DataService;
|
||||
|
||||
@Component
|
||||
public class EventListenerBean {
|
||||
+2
-3
@@ -1,5 +1,6 @@
|
||||
package tn.mnlr.vripper;
|
||||
package me.vripper;
|
||||
|
||||
import java.util.Map;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
@@ -7,8 +8,6 @@ import org.springframework.context.ApplicationContextAware;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Component
|
||||
@Slf4j
|
||||
public class SpringContext implements ApplicationContextAware {
|
||||
+2
-3
@@ -1,10 +1,9 @@
|
||||
package tn.mnlr.vripper;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
package me.vripper;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.io.StringWriter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Slf4j
|
||||
public class Utils {
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package tn.mnlr.vripper;
|
||||
package me.vripper;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
+20
-21
@@ -1,7 +1,25 @@
|
||||
package tn.mnlr.vripper.download;
|
||||
package me.vripper.download;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.StandardCopyOption;
|
||||
import java.util.*;
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.imageio.ImageReader;
|
||||
import javax.imageio.stream.ImageInputStream;
|
||||
import lombok.Getter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.vripper.SpringContext;
|
||||
import me.vripper.exception.DownloadException;
|
||||
import me.vripper.exception.HostException;
|
||||
import me.vripper.jpa.domain.Image;
|
||||
import me.vripper.jpa.domain.Post;
|
||||
import me.vripper.jpa.domain.enums.Status;
|
||||
import me.vripper.services.*;
|
||||
import me.vripper.services.domain.Settings;
|
||||
import net.jodah.failsafe.function.CheckedRunnable;
|
||||
import org.apache.http.client.HttpClient;
|
||||
import org.apache.http.client.methods.AbstractExecutionAwareRequest;
|
||||
@@ -10,25 +28,6 @@ import org.apache.http.client.methods.HttpGet;
|
||||
import org.apache.http.client.protocol.HttpClientContext;
|
||||
import org.apache.http.impl.client.BasicCookieStore;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
import tn.mnlr.vripper.SpringContext;
|
||||
import tn.mnlr.vripper.exception.DownloadException;
|
||||
import tn.mnlr.vripper.exception.HostException;
|
||||
import tn.mnlr.vripper.jpa.domain.Image;
|
||||
import tn.mnlr.vripper.jpa.domain.Post;
|
||||
import tn.mnlr.vripper.jpa.domain.enums.Status;
|
||||
import tn.mnlr.vripper.services.*;
|
||||
import tn.mnlr.vripper.services.domain.Settings;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.imageio.ImageReader;
|
||||
import javax.imageio.stream.ImageInputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.StandardCopyOption;
|
||||
import java.util.*;
|
||||
|
||||
@Slf4j
|
||||
public class DownloadJob implements CheckedRunnable {
|
||||
@@ -98,7 +97,7 @@ public class DownloadJob implements CheckedRunnable {
|
||||
log.debug(
|
||||
String.format(
|
||||
"Getting image url and name from %s using %s", image.getUrl(), image.getHost()));
|
||||
HostService.NameUrl nameAndUrl = image.getHost().getNameAndUrl(image.getUrl(), context);
|
||||
HostService.NameUrl nameAndUrl = image.getHost().getNameAndUrl(image, context);
|
||||
log.debug(String.format("Resolved name for %s: %s", image.getUrl(), nameAndUrl.getName()));
|
||||
log.debug(
|
||||
String.format("Resolved image url for %s: %s", image.getUrl(), nameAndUrl.getUrl()));
|
||||
+10
-11
@@ -1,16 +1,15 @@
|
||||
package tn.mnlr.vripper.download;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.jodah.failsafe.Failsafe;
|
||||
import tn.mnlr.vripper.SpringContext;
|
||||
import tn.mnlr.vripper.Utils;
|
||||
import tn.mnlr.vripper.jpa.domain.LogEvent;
|
||||
import tn.mnlr.vripper.jpa.domain.enums.Status;
|
||||
import tn.mnlr.vripper.jpa.repositories.ILogEventRepository;
|
||||
import tn.mnlr.vripper.services.ConnectionService;
|
||||
import tn.mnlr.vripper.services.DataService;
|
||||
package me.vripper.download;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.vripper.SpringContext;
|
||||
import me.vripper.Utils;
|
||||
import me.vripper.jpa.domain.LogEvent;
|
||||
import me.vripper.jpa.domain.enums.Status;
|
||||
import me.vripper.jpa.repositories.ILogEventRepository;
|
||||
import me.vripper.services.ConnectionService;
|
||||
import me.vripper.services.DataService;
|
||||
import net.jodah.failsafe.Failsafe;
|
||||
|
||||
@Slf4j
|
||||
public class DownloadJobWrapper implements Runnable {
|
||||
+14
-15
@@ -1,25 +1,24 @@
|
||||
package tn.mnlr.vripper.download;
|
||||
package me.vripper.download;
|
||||
|
||||
import lombok.NonNull;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import tn.mnlr.vripper.host.Host;
|
||||
import tn.mnlr.vripper.jpa.domain.Image;
|
||||
import tn.mnlr.vripper.jpa.domain.Post;
|
||||
import tn.mnlr.vripper.jpa.domain.enums.Status;
|
||||
import tn.mnlr.vripper.services.DataService;
|
||||
import tn.mnlr.vripper.services.MetadataService;
|
||||
import tn.mnlr.vripper.services.SettingsService;
|
||||
import tn.mnlr.vripper.services.domain.Settings;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import jakarta.annotation.PostConstruct;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.stream.Collectors;
|
||||
import lombok.NonNull;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.vripper.host.Host;
|
||||
import me.vripper.jpa.domain.Image;
|
||||
import me.vripper.jpa.domain.Post;
|
||||
import me.vripper.jpa.domain.enums.Status;
|
||||
import me.vripper.services.DataService;
|
||||
import me.vripper.services.MetadataService;
|
||||
import me.vripper.services.SettingsService;
|
||||
import me.vripper.services.domain.Settings;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package tn.mnlr.vripper.event;
|
||||
package me.vripper.event;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
+2
-3
@@ -1,11 +1,10 @@
|
||||
package tn.mnlr.vripper.event;
|
||||
package me.vripper.event;
|
||||
|
||||
import jakarta.annotation.PreDestroy;
|
||||
import org.springframework.stereotype.Service;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Sinks;
|
||||
|
||||
import javax.annotation.PreDestroy;
|
||||
|
||||
@Service
|
||||
public class EventBus {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package tn.mnlr.vripper.exception;
|
||||
package me.vripper.exception;
|
||||
|
||||
public class DownloadException extends Exception {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package tn.mnlr.vripper.exception;
|
||||
package me.vripper.exception;
|
||||
|
||||
public class HostException extends Exception {
|
||||
public HostException(Throwable e) {
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package tn.mnlr.vripper.exception;
|
||||
package me.vripper.exception;
|
||||
|
||||
public class HtmlProcessorException extends Exception {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package tn.mnlr.vripper.exception;
|
||||
package me.vripper.exception;
|
||||
|
||||
public class PostParseException extends Exception {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package tn.mnlr.vripper.exception;
|
||||
package me.vripper.exception;
|
||||
|
||||
public class QueueException extends Exception {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package tn.mnlr.vripper.exception;
|
||||
package me.vripper.exception;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package tn.mnlr.vripper.exception;
|
||||
package me.vripper.exception;
|
||||
|
||||
public class ValidationException extends Exception {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package tn.mnlr.vripper.exception;
|
||||
package me.vripper.exception;
|
||||
|
||||
public class VripperException extends Exception {
|
||||
public VripperException(String message) {
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package tn.mnlr.vripper.exception;
|
||||
package me.vripper.exception;
|
||||
|
||||
public class XpathException extends Exception {
|
||||
public XpathException(Throwable e) {
|
||||
+20
-18
@@ -1,6 +1,15 @@
|
||||
package tn.mnlr.vripper.host;
|
||||
package me.vripper.host;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.vripper.exception.HostException;
|
||||
import me.vripper.exception.XpathException;
|
||||
import me.vripper.jpa.domain.Image;
|
||||
import me.vripper.services.ConnectionService;
|
||||
import me.vripper.services.HostService;
|
||||
import me.vripper.services.HtmlProcessorService;
|
||||
import me.vripper.services.XpathService;
|
||||
import org.apache.http.NameValuePair;
|
||||
import org.apache.http.client.HttpClient;
|
||||
import org.apache.http.client.entity.UrlEncodedFormEntity;
|
||||
@@ -13,15 +22,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Node;
|
||||
import tn.mnlr.vripper.exception.HostException;
|
||||
import tn.mnlr.vripper.exception.XpathException;
|
||||
import tn.mnlr.vripper.services.ConnectionService;
|
||||
import tn.mnlr.vripper.services.HostService;
|
||||
import tn.mnlr.vripper.services.HtmlProcessorService;
|
||||
import tn.mnlr.vripper.services.XpathService;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
@@ -59,24 +59,26 @@ public class AcidimgHost extends Host {
|
||||
}
|
||||
|
||||
@Override
|
||||
public HostService.NameUrl getNameAndUrl(final String url, final HttpClientContext context)
|
||||
public HostService.NameUrl getNameAndUrl(final Image image, final HttpClientContext context)
|
||||
throws HostException {
|
||||
|
||||
Document doc = hostService.getResponse(url, context).getDocument();
|
||||
Document doc = hostService.getResponse(image.getUrl(), context).getDocument();
|
||||
|
||||
Node contDiv;
|
||||
try {
|
||||
log.debug(String.format("Looking for xpath expression %s in %s", CONTINUE_BUTTON_XPATH, url));
|
||||
log.debug(
|
||||
String.format(
|
||||
"Looking for xpath expression %s in %s", CONTINUE_BUTTON_XPATH, image.getUrl()));
|
||||
contDiv = xpathService.getAsNode(doc, CONTINUE_BUTTON_XPATH);
|
||||
} catch (XpathException e) {
|
||||
throw new HostException(e);
|
||||
}
|
||||
|
||||
if (contDiv != null) {
|
||||
log.debug(String.format("Click button found for %s", url));
|
||||
log.debug(String.format("Click button found for %s", image.getUrl()));
|
||||
HttpClient client = cm.getClient().build();
|
||||
HttpPost httpPost = cm.buildHttpPost(url, context);
|
||||
httpPost.addHeader("Referer", url);
|
||||
HttpPost httpPost = cm.buildHttpPost(image.getUrl(), context);
|
||||
httpPost.addHeader("Referer", image.getUrl());
|
||||
List<NameValuePair> params = new ArrayList<>();
|
||||
params.add(new BasicNameValuePair("imgContinue", "Continue to your image"));
|
||||
try {
|
||||
@@ -98,7 +100,7 @@ public class AcidimgHost extends Host {
|
||||
|
||||
Node imgNode;
|
||||
try {
|
||||
log.debug(String.format("Looking for xpath expression %s in %s", IMG_XPATH, url));
|
||||
log.debug(String.format("Looking for xpath expression %s in %s", IMG_XPATH, image.getUrl()));
|
||||
imgNode = xpathService.getAsNode(doc, IMG_XPATH);
|
||||
} catch (XpathException e) {
|
||||
throw new HostException(e);
|
||||
@@ -109,7 +111,7 @@ public class AcidimgHost extends Host {
|
||||
}
|
||||
|
||||
try {
|
||||
log.debug(String.format("Resolving name and image url for %s", url));
|
||||
log.debug(String.format("Resolving name and image url for %s", image.getUrl()));
|
||||
String imgTitle = imgNode.getAttributes().getNamedItem("alt").getTextContent().trim();
|
||||
String imgUrl = imgNode.getAttributes().getNamedItem("src").getTextContent().trim();
|
||||
|
||||
+14
-13
@@ -1,18 +1,18 @@
|
||||
package tn.mnlr.vripper.host;
|
||||
package me.vripper.host;
|
||||
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.vripper.exception.HostException;
|
||||
import me.vripper.exception.XpathException;
|
||||
import me.vripper.jpa.domain.Image;
|
||||
import me.vripper.services.HostService;
|
||||
import me.vripper.services.XpathService;
|
||||
import org.apache.http.client.protocol.HttpClientContext;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Node;
|
||||
import tn.mnlr.vripper.exception.HostException;
|
||||
import tn.mnlr.vripper.exception.XpathException;
|
||||
import tn.mnlr.vripper.services.HostService;
|
||||
import tn.mnlr.vripper.services.XpathService;
|
||||
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
@@ -41,27 +41,28 @@ public class DPicMeHost extends Host {
|
||||
}
|
||||
|
||||
@Override
|
||||
public HostService.NameUrl getNameAndUrl(final String url, final HttpClientContext context)
|
||||
public HostService.NameUrl getNameAndUrl(final Image image, final HttpClientContext context)
|
||||
throws HostException {
|
||||
|
||||
HostService.Response response =
|
||||
hostService.getResponse(url.replace("http://", "https://"), context);
|
||||
hostService.getResponse(image.getUrl().replace("http://", "https://"), context);
|
||||
Document doc = response.getDocument();
|
||||
|
||||
Node imgNode;
|
||||
try {
|
||||
log.debug(String.format("Looking for xpath expression %s in %s", IMG_XPATH, url));
|
||||
log.debug(String.format("Looking for xpath expression %s in %s", IMG_XPATH, image.getUrl()));
|
||||
imgNode = xpathService.getAsNode(doc, IMG_XPATH);
|
||||
} catch (XpathException e) {
|
||||
throw new HostException(e);
|
||||
}
|
||||
|
||||
if (imgNode == null) {
|
||||
throw new HostException(String.format("Xpath '%s' cannot be found in '%s'", IMG_XPATH, url));
|
||||
throw new HostException(
|
||||
String.format("Xpath '%s' cannot be found in '%s'", IMG_XPATH, image.getUrl()));
|
||||
}
|
||||
|
||||
try {
|
||||
log.debug(String.format("Resolving name and image url for %s", url));
|
||||
log.debug(String.format("Resolving name and image url for %s", image.getUrl()));
|
||||
String imgTitle =
|
||||
Optional.ofNullable(imgNode.getAttributes().getNamedItem("alt"))
|
||||
.map(e -> e.getTextContent().trim())
|
||||
+8
-8
@@ -1,12 +1,12 @@
|
||||
package tn.mnlr.vripper.host;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.http.client.protocol.HttpClientContext;
|
||||
import org.springframework.stereotype.Service;
|
||||
import tn.mnlr.vripper.exception.HostException;
|
||||
import tn.mnlr.vripper.services.HostService;
|
||||
package me.vripper.host;
|
||||
|
||||
import java.util.Objects;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.vripper.exception.HostException;
|
||||
import me.vripper.jpa.domain.Image;
|
||||
import me.vripper.services.HostService;
|
||||
import org.apache.http.client.protocol.HttpClientContext;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
@@ -21,7 +21,7 @@ public abstract class Host {
|
||||
}
|
||||
|
||||
public abstract HostService.NameUrl getNameAndUrl(
|
||||
final String url, final HttpClientContext context) throws HostException;
|
||||
final Image image, final HttpClientContext context) throws HostException;
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
+23
-15
@@ -1,18 +1,20 @@
|
||||
package tn.mnlr.vripper.host;
|
||||
package me.vripper.host;
|
||||
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.vripper.exception.HostException;
|
||||
import me.vripper.exception.XpathException;
|
||||
import me.vripper.jpa.domain.Image;
|
||||
import me.vripper.services.HostService;
|
||||
import me.vripper.services.XpathService;
|
||||
import org.apache.http.client.protocol.HttpClientContext;
|
||||
import org.apache.http.impl.client.BasicCookieStore;
|
||||
import org.apache.http.impl.cookie.BasicClientCookie;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Node;
|
||||
import tn.mnlr.vripper.exception.HostException;
|
||||
import tn.mnlr.vripper.exception.XpathException;
|
||||
import tn.mnlr.vripper.services.HostService;
|
||||
import tn.mnlr.vripper.services.XpathService;
|
||||
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
@@ -42,17 +44,22 @@ public class ImageBamHost extends Host {
|
||||
}
|
||||
|
||||
@Override
|
||||
public HostService.NameUrl getNameAndUrl(final String url, final HttpClientContext context)
|
||||
public HostService.NameUrl getNameAndUrl(final Image image, final HttpClientContext context)
|
||||
throws HostException {
|
||||
context.setCookieStore(new BasicCookieStore());
|
||||
BasicClientCookie cookie = new BasicClientCookie("nsfw_inter", "1");
|
||||
cookie.setDomain("www.imagebam.com");
|
||||
context.getCookieStore().addCookie(cookie);
|
||||
|
||||
HostService.Response response = hostService.getResponse(url, context);
|
||||
HostService.Response response = hostService.getResponse(image.getUrl(), context);
|
||||
Document doc = response.getDocument();
|
||||
|
||||
try {
|
||||
log.debug(String.format("Looking for xpath expression %s in %s", CONTINUE_XPATH, url));
|
||||
log.debug(
|
||||
String.format("Looking for xpath expression %s in %s", CONTINUE_XPATH, image.getUrl()));
|
||||
if (xpathService.getAsNode(doc, CONTINUE_XPATH) != null) {
|
||||
// Button detected. No need to actually click it, just make the call again.
|
||||
response = hostService.getResponse(url, context);
|
||||
response = hostService.getResponse(image.getUrl(), context);
|
||||
doc = response.getDocument();
|
||||
}
|
||||
} catch (XpathException e) {
|
||||
@@ -61,18 +68,19 @@ public class ImageBamHost extends Host {
|
||||
|
||||
Node imgNode;
|
||||
try {
|
||||
log.debug(String.format("Looking for xpath expression %s in %s", IMG_XPATH, url));
|
||||
log.debug(String.format("Looking for xpath expression %s in %s", IMG_XPATH, image.getUrl()));
|
||||
imgNode = xpathService.getAsNode(doc, IMG_XPATH);
|
||||
} catch (XpathException e) {
|
||||
throw new HostException(e);
|
||||
}
|
||||
|
||||
if (imgNode == null) {
|
||||
throw new HostException(String.format("Xpath '%s' cannot be found in '%s'", IMG_XPATH, url));
|
||||
throw new HostException(
|
||||
String.format("Xpath '%s' cannot be found in '%s'", IMG_XPATH, image.getUrl()));
|
||||
}
|
||||
|
||||
try {
|
||||
log.debug(String.format("Resolving name and image url for %s", url));
|
||||
log.debug(String.format("Resolving name and image url for %s", image.getUrl()));
|
||||
String imgTitle =
|
||||
Optional.ofNullable(imgNode.getAttributes().getNamedItem("alt"))
|
||||
.map(e -> e.getTextContent().trim())
|
||||
+11
-11
@@ -1,17 +1,17 @@
|
||||
package tn.mnlr.vripper.host;
|
||||
package me.vripper.host;
|
||||
|
||||
import java.util.Optional;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.vripper.exception.HostException;
|
||||
import me.vripper.exception.XpathException;
|
||||
import me.vripper.jpa.domain.Image;
|
||||
import me.vripper.services.HostService;
|
||||
import me.vripper.services.XpathService;
|
||||
import org.apache.http.client.protocol.HttpClientContext;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Node;
|
||||
import tn.mnlr.vripper.exception.HostException;
|
||||
import tn.mnlr.vripper.exception.XpathException;
|
||||
import tn.mnlr.vripper.services.HostService;
|
||||
import tn.mnlr.vripper.services.XpathService;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
@@ -40,21 +40,21 @@ public class ImageTwistHost extends Host {
|
||||
}
|
||||
|
||||
@Override
|
||||
public HostService.NameUrl getNameAndUrl(final String url, final HttpClientContext context)
|
||||
public HostService.NameUrl getNameAndUrl(final Image image, final HttpClientContext context)
|
||||
throws HostException {
|
||||
|
||||
Document doc = hostService.getResponse(url, context).getDocument();
|
||||
Document doc = hostService.getResponse(image.getUrl(), context).getDocument();
|
||||
|
||||
Node imgNode;
|
||||
try {
|
||||
log.debug(String.format("Looking for xpath expression %s in %s", IMG_XPATH, url));
|
||||
log.debug(String.format("Looking for xpath expression %s in %s", IMG_XPATH, image.getUrl()));
|
||||
imgNode = xpathService.getAsNode(doc, IMG_XPATH);
|
||||
} catch (XpathException e) {
|
||||
throw new HostException(e);
|
||||
}
|
||||
|
||||
try {
|
||||
log.debug(String.format("Resolving name and image url for %s", url));
|
||||
log.debug(String.format("Resolving name and image url for %s", image.getUrl()));
|
||||
String imgTitle =
|
||||
Optional.ofNullable(imgNode.getAttributes().getNamedItem("alt"))
|
||||
.map(Node::getTextContent)
|
||||
+8
-7
@@ -1,15 +1,16 @@
|
||||
package tn.mnlr.vripper.host;
|
||||
package me.vripper.host;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.vripper.exception.HostException;
|
||||
import me.vripper.exception.XpathException;
|
||||
import me.vripper.jpa.domain.Image;
|
||||
import me.vripper.services.HostService;
|
||||
import me.vripper.services.XpathService;
|
||||
import org.apache.http.client.protocol.HttpClientContext;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Node;
|
||||
import tn.mnlr.vripper.exception.HostException;
|
||||
import tn.mnlr.vripper.exception.XpathException;
|
||||
import tn.mnlr.vripper.services.HostService;
|
||||
import tn.mnlr.vripper.services.XpathService;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
@@ -39,10 +40,10 @@ public class ImageVenueHost extends Host {
|
||||
}
|
||||
|
||||
@Override
|
||||
public HostService.NameUrl getNameAndUrl(final String _url, final HttpClientContext context)
|
||||
public HostService.NameUrl getNameAndUrl(final Image image, final HttpClientContext context)
|
||||
throws HostException {
|
||||
|
||||
String url = _url.replace("http://", "https://");
|
||||
String url = image.getUrl().replace("http://", "https://");
|
||||
|
||||
HostService.Response resp = hostService.getResponse(url, context);
|
||||
Document doc = resp.getDocument();
|
||||
+12
-11
@@ -1,15 +1,16 @@
|
||||
package tn.mnlr.vripper.host;
|
||||
package me.vripper.host;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.vripper.exception.HostException;
|
||||
import me.vripper.exception.XpathException;
|
||||
import me.vripper.jpa.domain.Image;
|
||||
import me.vripper.services.HostService;
|
||||
import me.vripper.services.XpathService;
|
||||
import org.apache.http.client.protocol.HttpClientContext;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Node;
|
||||
import tn.mnlr.vripper.exception.HostException;
|
||||
import tn.mnlr.vripper.exception.XpathException;
|
||||
import tn.mnlr.vripper.services.HostService;
|
||||
import tn.mnlr.vripper.services.XpathService;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
@@ -39,16 +40,16 @@ public class ImageZillaHost extends Host {
|
||||
}
|
||||
|
||||
@Override
|
||||
public HostService.NameUrl getNameAndUrl(final String url, final HttpClientContext context)
|
||||
public HostService.NameUrl getNameAndUrl(final Image image, final HttpClientContext context)
|
||||
throws HostException {
|
||||
|
||||
Document doc = hostService.getResponse(url, context).getDocument();
|
||||
Document doc = hostService.getResponse(image.getUrl(), context).getDocument();
|
||||
|
||||
String title;
|
||||
try {
|
||||
log.debug(String.format("Looking for xpath expression %s in %s", IMG_XPATH, url));
|
||||
log.debug(String.format("Looking for xpath expression %s in %s", IMG_XPATH, image.getUrl()));
|
||||
Node titleNode = xpathService.getAsNode(doc, IMG_XPATH).getAttributes().getNamedItem("title");
|
||||
log.debug(String.format("Resolving name for %s", url));
|
||||
log.debug(String.format("Resolving name for %s", image.getUrl()));
|
||||
if (titleNode != null) {
|
||||
title = titleNode.getTextContent().trim();
|
||||
} else {
|
||||
@@ -59,11 +60,11 @@ public class ImageZillaHost extends Host {
|
||||
}
|
||||
|
||||
if (title == null || title.isEmpty()) {
|
||||
title = hostService.getDefaultImageName(url);
|
||||
title = hostService.getDefaultImageName(image.getUrl());
|
||||
}
|
||||
|
||||
try {
|
||||
return new HostService.NameUrl(title, url.replace("show", "images"));
|
||||
return new HostService.NameUrl(title, image.getUrl().replace("show", "images"));
|
||||
} catch (Exception e) {
|
||||
throw new HostException("Unexpected error occurred", e);
|
||||
}
|
||||
+8
-7
@@ -1,15 +1,16 @@
|
||||
package tn.mnlr.vripper.host;
|
||||
package me.vripper.host;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.vripper.exception.HostException;
|
||||
import me.vripper.exception.XpathException;
|
||||
import me.vripper.jpa.domain.Image;
|
||||
import me.vripper.services.HostService;
|
||||
import me.vripper.services.XpathService;
|
||||
import org.apache.http.client.protocol.HttpClientContext;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Node;
|
||||
import tn.mnlr.vripper.exception.HostException;
|
||||
import tn.mnlr.vripper.exception.XpathException;
|
||||
import tn.mnlr.vripper.services.HostService;
|
||||
import tn.mnlr.vripper.services.XpathService;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
@@ -38,10 +39,10 @@ public class ImgSpiceHost extends Host {
|
||||
}
|
||||
|
||||
@Override
|
||||
public HostService.NameUrl getNameAndUrl(final String _url, final HttpClientContext context)
|
||||
public HostService.NameUrl getNameAndUrl(final Image image, final HttpClientContext context)
|
||||
throws HostException {
|
||||
|
||||
String url = _url.replace("http://", "https://");
|
||||
String url = image.getUrl().replace("http://", "https://");
|
||||
HostService.Response resp = hostService.getResponse(url, context);
|
||||
Document doc = resp.getDocument();
|
||||
|
||||
+10
-9
@@ -1,15 +1,16 @@
|
||||
package tn.mnlr.vripper.host;
|
||||
package me.vripper.host;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.vripper.exception.HostException;
|
||||
import me.vripper.exception.XpathException;
|
||||
import me.vripper.jpa.domain.Image;
|
||||
import me.vripper.services.HostService;
|
||||
import me.vripper.services.XpathService;
|
||||
import org.apache.http.client.protocol.HttpClientContext;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Node;
|
||||
import tn.mnlr.vripper.exception.HostException;
|
||||
import tn.mnlr.vripper.exception.XpathException;
|
||||
import tn.mnlr.vripper.services.HostService;
|
||||
import tn.mnlr.vripper.services.XpathService;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
@@ -38,21 +39,21 @@ public class ImgboxHost extends Host {
|
||||
}
|
||||
|
||||
@Override
|
||||
public HostService.NameUrl getNameAndUrl(final String url, final HttpClientContext context)
|
||||
public HostService.NameUrl getNameAndUrl(final Image image, final HttpClientContext context)
|
||||
throws HostException {
|
||||
|
||||
Document doc = hostService.getResponse(url, context).getDocument();
|
||||
Document doc = hostService.getResponse(image.getUrl(), context).getDocument();
|
||||
|
||||
Node imgNode;
|
||||
try {
|
||||
log.debug(String.format("Looking for xpath expression %s in %s", IMG_XPATH, url));
|
||||
log.debug(String.format("Looking for xpath expression %s in %s", IMG_XPATH, image.getUrl()));
|
||||
imgNode = xpathService.getAsNode(doc, IMG_XPATH);
|
||||
} catch (XpathException e) {
|
||||
throw new HostException(e);
|
||||
}
|
||||
|
||||
try {
|
||||
log.debug(String.format("Resolving name and image url for %s", url));
|
||||
log.debug(String.format("Resolving name and image url for %s", image.getUrl()));
|
||||
String imgTitle = imgNode.getAttributes().getNamedItem("title").getTextContent().trim();
|
||||
String imgUrl = imgNode.getAttributes().getNamedItem("src").getTextContent().trim();
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
package me.vripper.host;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.vripper.exception.HostException;
|
||||
import me.vripper.jpa.domain.Image;
|
||||
import me.vripper.services.HostService;
|
||||
import org.apache.http.client.protocol.HttpClientContext;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
public class ImxHost extends Host {
|
||||
|
||||
private static final String host = "imx.to";
|
||||
|
||||
@Override
|
||||
public String getHost() {
|
||||
return host;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getLookup() {
|
||||
return host;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HostService.NameUrl getNameAndUrl(final Image image, final HttpClientContext context)
|
||||
throws HostException {
|
||||
|
||||
log.debug(String.format("Resolving name and image url for %s", image.getUrl()));
|
||||
String imgTitle = String.format("IMG_%04d", image.getIndex() + 1);
|
||||
String imgUrl =
|
||||
image
|
||||
.getThumbUrl()
|
||||
.replace("http:", "https:")
|
||||
.replace("upload/small/", "u/i/")
|
||||
.replace("u/t/", "u/i/");
|
||||
return new HostService.NameUrl(imgTitle, imgUrl);
|
||||
}
|
||||
}
|
||||
+8
-7
@@ -1,15 +1,16 @@
|
||||
package tn.mnlr.vripper.host;
|
||||
package me.vripper.host;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.vripper.exception.HostException;
|
||||
import me.vripper.exception.XpathException;
|
||||
import me.vripper.jpa.domain.Image;
|
||||
import me.vripper.services.HostService;
|
||||
import me.vripper.services.XpathService;
|
||||
import org.apache.http.client.protocol.HttpClientContext;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Node;
|
||||
import tn.mnlr.vripper.exception.HostException;
|
||||
import tn.mnlr.vripper.exception.XpathException;
|
||||
import tn.mnlr.vripper.services.HostService;
|
||||
import tn.mnlr.vripper.services.XpathService;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
@@ -39,12 +40,12 @@ public class PimpandhostHost extends Host {
|
||||
}
|
||||
|
||||
@Override
|
||||
public HostService.NameUrl getNameAndUrl(final String _url, final HttpClientContext context)
|
||||
public HostService.NameUrl getNameAndUrl(final Image image, final HttpClientContext context)
|
||||
throws HostException {
|
||||
|
||||
String url;
|
||||
try {
|
||||
url = hostService.appendUri(_url.replace("http://", "https://"), "size=original");
|
||||
url = hostService.appendUri(image.getUrl().replace("http://", "https://"), "size=original");
|
||||
} catch (Exception e) {
|
||||
throw new HostException(e);
|
||||
}
|
||||
+8
-7
@@ -1,15 +1,16 @@
|
||||
package tn.mnlr.vripper.host;
|
||||
package me.vripper.host;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.vripper.exception.HostException;
|
||||
import me.vripper.exception.XpathException;
|
||||
import me.vripper.jpa.domain.Image;
|
||||
import me.vripper.services.HostService;
|
||||
import me.vripper.services.XpathService;
|
||||
import org.apache.http.client.protocol.HttpClientContext;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Node;
|
||||
import tn.mnlr.vripper.exception.HostException;
|
||||
import tn.mnlr.vripper.exception.XpathException;
|
||||
import tn.mnlr.vripper.services.HostService;
|
||||
import tn.mnlr.vripper.services.XpathService;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
@@ -38,10 +39,10 @@ public class PixRouteHost extends Host {
|
||||
}
|
||||
|
||||
@Override
|
||||
public HostService.NameUrl getNameAndUrl(final String _url, final HttpClientContext context)
|
||||
public HostService.NameUrl getNameAndUrl(final Image image, final HttpClientContext context)
|
||||
throws HostException {
|
||||
|
||||
String url = _url.replace("http://", "https://");
|
||||
String url = image.getUrl().replace("http://", "https://");
|
||||
Document doc = hostService.getResponse(url, context).getDocument();
|
||||
|
||||
Node imgNode;
|
||||
+10
-9
@@ -1,15 +1,16 @@
|
||||
package tn.mnlr.vripper.host;
|
||||
package me.vripper.host;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.vripper.exception.HostException;
|
||||
import me.vripper.exception.XpathException;
|
||||
import me.vripper.jpa.domain.Image;
|
||||
import me.vripper.services.HostService;
|
||||
import me.vripper.services.XpathService;
|
||||
import org.apache.http.client.protocol.HttpClientContext;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Node;
|
||||
import tn.mnlr.vripper.exception.HostException;
|
||||
import tn.mnlr.vripper.exception.XpathException;
|
||||
import tn.mnlr.vripper.services.HostService;
|
||||
import tn.mnlr.vripper.services.XpathService;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
@@ -39,21 +40,21 @@ public class PixhostHost extends Host {
|
||||
}
|
||||
|
||||
@Override
|
||||
public HostService.NameUrl getNameAndUrl(final String url, final HttpClientContext context)
|
||||
public HostService.NameUrl getNameAndUrl(final Image image, final HttpClientContext context)
|
||||
throws HostException {
|
||||
|
||||
Document doc = hostService.getResponse(url, context).getDocument();
|
||||
Document doc = hostService.getResponse(image.getUrl(), context).getDocument();
|
||||
|
||||
Node imgNode;
|
||||
try {
|
||||
log.debug(String.format("Looking for xpath expression %s in %s", IMG_XPATH, url));
|
||||
log.debug(String.format("Looking for xpath expression %s in %s", IMG_XPATH, image.getUrl()));
|
||||
imgNode = xpathService.getAsNode(doc, IMG_XPATH);
|
||||
} catch (XpathException e) {
|
||||
throw new HostException(e);
|
||||
}
|
||||
|
||||
try {
|
||||
log.debug(String.format("Resolving name and image url for %s", url));
|
||||
log.debug(String.format("Resolving name and image url for %s", image.getUrl()));
|
||||
String imgTitle = imgNode.getAttributes().getNamedItem("alt").getTextContent().trim();
|
||||
String imgUrl = imgNode.getAttributes().getNamedItem("src").getTextContent().trim();
|
||||
|
||||
+8
-7
@@ -1,15 +1,16 @@
|
||||
package tn.mnlr.vripper.host;
|
||||
package me.vripper.host;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.vripper.exception.HostException;
|
||||
import me.vripper.exception.XpathException;
|
||||
import me.vripper.jpa.domain.Image;
|
||||
import me.vripper.services.HostService;
|
||||
import me.vripper.services.XpathService;
|
||||
import org.apache.http.client.protocol.HttpClientContext;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Node;
|
||||
import tn.mnlr.vripper.exception.HostException;
|
||||
import tn.mnlr.vripper.exception.XpathException;
|
||||
import tn.mnlr.vripper.services.HostService;
|
||||
import tn.mnlr.vripper.services.XpathService;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
@@ -39,10 +40,10 @@ public class PixxxelsHost extends Host {
|
||||
}
|
||||
|
||||
@Override
|
||||
public HostService.NameUrl getNameAndUrl(final String _url, final HttpClientContext context)
|
||||
public HostService.NameUrl getNameAndUrl(final Image image, final HttpClientContext context)
|
||||
throws HostException {
|
||||
|
||||
String url = _url.replace("http://", "https://");
|
||||
String url = image.getUrl().replace("http://", "https://");
|
||||
HostService.Response resp = hostService.getResponse(url, context);
|
||||
Document doc = resp.getDocument();
|
||||
|
||||
+9
-9
@@ -1,17 +1,17 @@
|
||||
package tn.mnlr.vripper.host;
|
||||
package me.vripper.host;
|
||||
|
||||
import java.util.Optional;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.vripper.exception.HostException;
|
||||
import me.vripper.exception.XpathException;
|
||||
import me.vripper.jpa.domain.Image;
|
||||
import me.vripper.services.HostService;
|
||||
import me.vripper.services.XpathService;
|
||||
import org.apache.http.client.protocol.HttpClientContext;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Node;
|
||||
import tn.mnlr.vripper.exception.HostException;
|
||||
import tn.mnlr.vripper.exception.XpathException;
|
||||
import tn.mnlr.vripper.services.HostService;
|
||||
import tn.mnlr.vripper.services.XpathService;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
@@ -41,10 +41,10 @@ public class PostImgHost extends Host {
|
||||
}
|
||||
|
||||
@Override
|
||||
public HostService.NameUrl getNameAndUrl(final String _url, final HttpClientContext context)
|
||||
public HostService.NameUrl getNameAndUrl(final Image image, final HttpClientContext context)
|
||||
throws HostException {
|
||||
|
||||
String url = _url.replace("http://", "https://");
|
||||
String url = image.getUrl().replace("http://", "https://");
|
||||
Document doc = hostService.getResponse(url, context).getDocument();
|
||||
|
||||
Node urlNode, titleNode;
|
||||
+12
-10
@@ -1,15 +1,16 @@
|
||||
package tn.mnlr.vripper.host;
|
||||
package me.vripper.host;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.vripper.exception.HostException;
|
||||
import me.vripper.exception.XpathException;
|
||||
import me.vripper.jpa.domain.Image;
|
||||
import me.vripper.services.HostService;
|
||||
import me.vripper.services.XpathService;
|
||||
import org.apache.http.client.protocol.HttpClientContext;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Node;
|
||||
import tn.mnlr.vripper.exception.HostException;
|
||||
import tn.mnlr.vripper.exception.XpathException;
|
||||
import tn.mnlr.vripper.services.HostService;
|
||||
import tn.mnlr.vripper.services.XpathService;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
@@ -39,16 +40,17 @@ public class TurboImageHost extends Host {
|
||||
}
|
||||
|
||||
@Override
|
||||
public HostService.NameUrl getNameAndUrl(final String url, final HttpClientContext context)
|
||||
public HostService.NameUrl getNameAndUrl(final Image image, final HttpClientContext context)
|
||||
throws HostException {
|
||||
|
||||
Document doc = hostService.getResponse(url, context).getDocument();
|
||||
Document doc = hostService.getResponse(image.getUrl(), context).getDocument();
|
||||
|
||||
String title;
|
||||
try {
|
||||
log.debug(String.format("Looking for xpath expression %s in %s", TITLE_XPATH, url));
|
||||
log.debug(
|
||||
String.format("Looking for xpath expression %s in %s", TITLE_XPATH, image.getUrl()));
|
||||
Node titleNode = xpathService.getAsNode(doc, TITLE_XPATH);
|
||||
log.debug(String.format("Resolving name for %s", url));
|
||||
log.debug(String.format("Resolving name for %s", image.getUrl()));
|
||||
if (titleNode != null) {
|
||||
title = titleNode.getTextContent().trim();
|
||||
} else {
|
||||
@@ -59,7 +61,7 @@ public class TurboImageHost extends Host {
|
||||
}
|
||||
|
||||
if (title == null || title.isEmpty()) {
|
||||
title = hostService.getDefaultImageName(url);
|
||||
title = hostService.getDefaultImageName(image.getUrl());
|
||||
}
|
||||
|
||||
try {
|
||||
+11
-11
@@ -1,17 +1,17 @@
|
||||
package tn.mnlr.vripper.host;
|
||||
package me.vripper.host;
|
||||
|
||||
import java.util.Optional;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.vripper.exception.HostException;
|
||||
import me.vripper.exception.XpathException;
|
||||
import me.vripper.jpa.domain.Image;
|
||||
import me.vripper.services.HostService;
|
||||
import me.vripper.services.XpathService;
|
||||
import org.apache.http.client.protocol.HttpClientContext;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Node;
|
||||
import tn.mnlr.vripper.exception.HostException;
|
||||
import tn.mnlr.vripper.exception.XpathException;
|
||||
import tn.mnlr.vripper.services.HostService;
|
||||
import tn.mnlr.vripper.services.XpathService;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
@@ -40,21 +40,21 @@ public class ViprImHost extends Host {
|
||||
}
|
||||
|
||||
@Override
|
||||
public HostService.NameUrl getNameAndUrl(final String url, final HttpClientContext context)
|
||||
public HostService.NameUrl getNameAndUrl(final Image image, final HttpClientContext context)
|
||||
throws HostException {
|
||||
|
||||
Document doc = hostService.getResponse(url, context).getDocument();
|
||||
Document doc = hostService.getResponse(image.getUrl(), context).getDocument();
|
||||
|
||||
Node imgNode;
|
||||
try {
|
||||
log.debug(String.format("Looking for xpath expression %s in %s", IMG_XPATH, url));
|
||||
log.debug(String.format("Looking for xpath expression %s in %s", IMG_XPATH, image.getUrl()));
|
||||
imgNode = xpathService.getAsNode(doc, IMG_XPATH);
|
||||
} catch (XpathException e) {
|
||||
throw new HostException(e);
|
||||
}
|
||||
|
||||
try {
|
||||
log.debug(String.format("Resolving name and image url for %s", url));
|
||||
log.debug(String.format("Resolving name and image url for %s", image.getUrl()));
|
||||
String imgTitle =
|
||||
Optional.ofNullable(imgNode.getAttributes().getNamedItem("alt"))
|
||||
.map(Node::getTextContent)
|
||||
+10
-11
@@ -1,15 +1,7 @@
|
||||
package tn.mnlr.vripper.jpa;
|
||||
package me.vripper.jpa;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
import tn.mnlr.vripper.download.DownloadService;
|
||||
import tn.mnlr.vripper.services.ThreadPoolService;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.annotation.PreDestroy;
|
||||
import jakarta.annotation.PostConstruct;
|
||||
import jakarta.annotation.PreDestroy;
|
||||
import java.io.File;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
@@ -17,6 +9,13 @@ import java.time.format.DateTimeFormatter;
|
||||
import java.util.Optional;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import me.vripper.download.DownloadService;
|
||||
import me.vripper.services.ThreadPoolService;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
@EnableScheduling
|
||||
+1
-2
@@ -1,9 +1,8 @@
|
||||
package tn.mnlr.vripper.jpa.domain;
|
||||
package me.vripper.jpa.domain;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonGenerator;
|
||||
import com.fasterxml.jackson.databind.SerializerProvider;
|
||||
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
+8
-6
@@ -1,14 +1,13 @@
|
||||
package tn.mnlr.vripper.jpa.domain;
|
||||
package me.vripper.jpa.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import java.util.Objects;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
import tn.mnlr.vripper.host.Host;
|
||||
import tn.mnlr.vripper.jpa.domain.enums.Status;
|
||||
|
||||
import java.util.Objects;
|
||||
import me.vripper.host.Host;
|
||||
import me.vripper.jpa.domain.enums.Status;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@@ -22,6 +21,8 @@ public class Image {
|
||||
|
||||
private String url;
|
||||
|
||||
private String thumbUrl;
|
||||
|
||||
private int index;
|
||||
|
||||
private long current = 0;
|
||||
@@ -34,9 +35,10 @@ public class Image {
|
||||
|
||||
@JsonIgnore private Long postIdRef;
|
||||
|
||||
public Image(String postId, String url, Host host, int index) {
|
||||
public Image(String postId, String url, String thumbUrl, Host host, int index) {
|
||||
this.postId = postId;
|
||||
this.url = url;
|
||||
this.thumbUrl = thumbUrl;
|
||||
this.host = host;
|
||||
this.index = index;
|
||||
status = Status.STOPPED;
|
||||
+2
-3
@@ -1,13 +1,12 @@
|
||||
package tn.mnlr.vripper.jpa.domain;
|
||||
package me.vripper.jpa.domain;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
+4
-5
@@ -1,11 +1,10 @@
|
||||
package tn.mnlr.vripper.jpa.domain;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
package me.vripper.jpa.domain;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
+6
-7
@@ -1,17 +1,16 @@
|
||||
package tn.mnlr.vripper.jpa.domain;
|
||||
package me.vripper.jpa.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
import tn.mnlr.vripper.jpa.domain.enums.Status;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Collections;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
import me.vripper.jpa.domain.enums.Status;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
+2
-3
@@ -1,13 +1,12 @@
|
||||
package tn.mnlr.vripper.jpa.domain;
|
||||
package me.vripper.jpa.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import java.util.Objects;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package tn.mnlr.vripper.jpa.domain.enums;
|
||||
package me.vripper.jpa.domain.enums;
|
||||
|
||||
public enum Status {
|
||||
PENDING,
|
||||
+3
-4
@@ -1,10 +1,9 @@
|
||||
package tn.mnlr.vripper.jpa.repositories;
|
||||
|
||||
import tn.mnlr.vripper.jpa.domain.Image;
|
||||
import tn.mnlr.vripper.jpa.domain.enums.Status;
|
||||
package me.vripper.jpa.repositories;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import me.vripper.jpa.domain.Image;
|
||||
import me.vripper.jpa.domain.enums.Status;
|
||||
|
||||
public interface IImageRepository extends IRepository {
|
||||
|
||||
+2
-3
@@ -1,9 +1,8 @@
|
||||
package tn.mnlr.vripper.jpa.repositories;
|
||||
|
||||
import tn.mnlr.vripper.jpa.domain.LogEvent;
|
||||
package me.vripper.jpa.repositories;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import me.vripper.jpa.domain.LogEvent;
|
||||
|
||||
public interface ILogEventRepository extends IRepository {
|
||||
|
||||
+2
-3
@@ -1,8 +1,7 @@
|
||||
package tn.mnlr.vripper.jpa.repositories;
|
||||
|
||||
import tn.mnlr.vripper.jpa.domain.Metadata;
|
||||
package me.vripper.jpa.repositories;
|
||||
|
||||
import java.util.Optional;
|
||||
import me.vripper.jpa.domain.Metadata;
|
||||
|
||||
public interface IMetadataRepository extends IRepository {
|
||||
|
||||
+3
-4
@@ -1,10 +1,9 @@
|
||||
package tn.mnlr.vripper.jpa.repositories;
|
||||
|
||||
import tn.mnlr.vripper.jpa.domain.Post;
|
||||
import tn.mnlr.vripper.jpa.domain.enums.Status;
|
||||
package me.vripper.jpa.repositories;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import me.vripper.jpa.domain.Post;
|
||||
import me.vripper.jpa.domain.enums.Status;
|
||||
|
||||
public interface IPostRepository extends IRepository {
|
||||
|
||||
+2
-3
@@ -1,9 +1,8 @@
|
||||
package tn.mnlr.vripper.jpa.repositories;
|
||||
|
||||
import tn.mnlr.vripper.jpa.domain.Queued;
|
||||
package me.vripper.jpa.repositories;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import me.vripper.jpa.domain.Queued;
|
||||
|
||||
public interface IQueuedRepository extends IRepository {
|
||||
Queued save(Queued queued);
|
||||
@@ -0,0 +1,3 @@
|
||||
package me.vripper.jpa.repositories;
|
||||
|
||||
public interface IRepository {}
|
||||
+15
-14
@@ -1,21 +1,20 @@
|
||||
package tn.mnlr.vripper.jpa.repositories.impl;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.jdbc.core.RowMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import tn.mnlr.vripper.SpringContext;
|
||||
import tn.mnlr.vripper.event.Event;
|
||||
import tn.mnlr.vripper.event.EventBus;
|
||||
import tn.mnlr.vripper.host.Host;
|
||||
import tn.mnlr.vripper.jpa.domain.Image;
|
||||
import tn.mnlr.vripper.jpa.domain.enums.Status;
|
||||
import tn.mnlr.vripper.jpa.repositories.IImageRepository;
|
||||
package me.vripper.jpa.repositories.impl;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import me.vripper.SpringContext;
|
||||
import me.vripper.event.Event;
|
||||
import me.vripper.event.EventBus;
|
||||
import me.vripper.host.Host;
|
||||
import me.vripper.jpa.domain.Image;
|
||||
import me.vripper.jpa.domain.enums.Status;
|
||||
import me.vripper.jpa.repositories.IImageRepository;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.jdbc.core.RowMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class ImageRepository implements IImageRepository {
|
||||
@@ -37,7 +36,7 @@ public class ImageRepository implements IImageRepository {
|
||||
public Image save(Image image) {
|
||||
long id = nextId();
|
||||
jdbcTemplate.update(
|
||||
"INSERT INTO IMAGE (ID, CURRENT, HOST, INDEX, POST_ID, STATUS, TOTAL, URL, POST_ID_REF) VALUES (?,?,?,?,?,?,?,?,?)",
|
||||
"INSERT INTO IMAGE (ID, CURRENT, HOST, INDEX, POST_ID, STATUS, TOTAL, URL, THUMB_URL, POST_ID_REF) VALUES (?,?,?,?,?,?,?,?,?,?)",
|
||||
id,
|
||||
image.getCurrent(),
|
||||
image.getHost().getHost(),
|
||||
@@ -46,6 +45,7 @@ public class ImageRepository implements IImageRepository {
|
||||
image.getStatus().name(),
|
||||
image.getTotal(),
|
||||
image.getUrl(),
|
||||
image.getThumbUrl(),
|
||||
image.getPostIdRef());
|
||||
image.setId(id);
|
||||
eventBus.publishEvent(Event.wrap(Event.Kind.IMAGE_UPDATE, id));
|
||||
@@ -145,6 +145,7 @@ class ImageRowMapper implements RowMapper<Image> {
|
||||
.findAny()
|
||||
.orElse(null));
|
||||
image.setUrl(rs.getString("URL"));
|
||||
image.setThumbUrl(rs.getString("THUMB_URL"));
|
||||
image.setIndex(rs.getInt("INDEX"));
|
||||
image.setCurrent(rs.getLong("CURRENT"));
|
||||
image.setTotal(rs.getLong("TOTAL"));
|
||||
+11
-12
@@ -1,15 +1,4 @@
|
||||
package tn.mnlr.vripper.jpa.repositories.impl;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.jdbc.core.RowMapper;
|
||||
import org.springframework.lang.NonNull;
|
||||
import org.springframework.stereotype.Service;
|
||||
import tn.mnlr.vripper.event.Event;
|
||||
import tn.mnlr.vripper.event.EventBus;
|
||||
import tn.mnlr.vripper.jpa.domain.LogEvent;
|
||||
import tn.mnlr.vripper.jpa.repositories.ILogEventRepository;
|
||||
import tn.mnlr.vripper.services.SettingsService;
|
||||
package me.vripper.jpa.repositories.impl;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
@@ -17,6 +6,16 @@ import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.vripper.event.Event;
|
||||
import me.vripper.event.EventBus;
|
||||
import me.vripper.jpa.domain.LogEvent;
|
||||
import me.vripper.jpa.repositories.ILogEventRepository;
|
||||
import me.vripper.services.SettingsService;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.jdbc.core.RowMapper;
|
||||
import org.springframework.lang.NonNull;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
+9
-10
@@ -1,18 +1,17 @@
|
||||
package tn.mnlr.vripper.jpa.repositories.impl;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.jdbc.core.RowMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import tn.mnlr.vripper.event.Event;
|
||||
import tn.mnlr.vripper.event.EventBus;
|
||||
import tn.mnlr.vripper.jpa.domain.Metadata;
|
||||
import tn.mnlr.vripper.jpa.repositories.IMetadataRepository;
|
||||
package me.vripper.jpa.repositories.impl;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import me.vripper.event.Event;
|
||||
import me.vripper.event.EventBus;
|
||||
import me.vripper.jpa.domain.Metadata;
|
||||
import me.vripper.jpa.repositories.IMetadataRepository;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.jdbc.core.RowMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class MetadataRepository implements IMetadataRepository {
|
||||
+11
-12
@@ -1,15 +1,4 @@
|
||||
package tn.mnlr.vripper.jpa.repositories.impl;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.jdbc.core.RowMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import tn.mnlr.vripper.event.Event;
|
||||
import tn.mnlr.vripper.event.EventBus;
|
||||
import tn.mnlr.vripper.jpa.domain.Metadata;
|
||||
import tn.mnlr.vripper.jpa.domain.Post;
|
||||
import tn.mnlr.vripper.jpa.domain.enums.Status;
|
||||
import tn.mnlr.vripper.jpa.repositories.IPostRepository;
|
||||
package me.vripper.jpa.repositories.impl;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
@@ -17,6 +6,16 @@ import java.sql.Timestamp;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import me.vripper.event.Event;
|
||||
import me.vripper.event.EventBus;
|
||||
import me.vripper.jpa.domain.Metadata;
|
||||
import me.vripper.jpa.domain.Post;
|
||||
import me.vripper.jpa.domain.enums.Status;
|
||||
import me.vripper.jpa.repositories.IPostRepository;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.jdbc.core.RowMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class PostRepository implements IPostRepository {
|
||||
+9
-10
@@ -1,18 +1,17 @@
|
||||
package tn.mnlr.vripper.jpa.repositories.impl;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.jdbc.core.RowMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import tn.mnlr.vripper.event.Event;
|
||||
import tn.mnlr.vripper.event.EventBus;
|
||||
import tn.mnlr.vripper.jpa.domain.Queued;
|
||||
import tn.mnlr.vripper.jpa.repositories.IQueuedRepository;
|
||||
package me.vripper.jpa.repositories.impl;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import me.vripper.event.Event;
|
||||
import me.vripper.event.EventBus;
|
||||
import me.vripper.jpa.domain.Queued;
|
||||
import me.vripper.jpa.repositories.IQueuedRepository;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.jdbc.core.RowMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class QueuedRepository implements IQueuedRepository {
|
||||
+10
-11
@@ -1,7 +1,16 @@
|
||||
package tn.mnlr.vripper.services;
|
||||
package me.vripper.services;
|
||||
|
||||
import jakarta.annotation.PreDestroy;
|
||||
import java.net.URI;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import lombok.Getter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.vripper.download.DownloadJob;
|
||||
import me.vripper.event.Event;
|
||||
import me.vripper.event.EventBus;
|
||||
import me.vripper.services.domain.Settings;
|
||||
import net.jodah.failsafe.RetryPolicy;
|
||||
import org.apache.http.client.config.CookieSpecs;
|
||||
import org.apache.http.client.config.RequestConfig;
|
||||
@@ -17,16 +26,6 @@ import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Service;
|
||||
import reactor.core.Disposable;
|
||||
import tn.mnlr.vripper.download.DownloadJob;
|
||||
import tn.mnlr.vripper.event.Event;
|
||||
import tn.mnlr.vripper.event.EventBus;
|
||||
import tn.mnlr.vripper.services.domain.Settings;
|
||||
|
||||
import javax.annotation.PreDestroy;
|
||||
import java.net.URI;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@Service
|
||||
@EnableScheduling
|
||||
+10
-12
@@ -1,21 +1,19 @@
|
||||
package tn.mnlr.vripper.services;
|
||||
package me.vripper.services;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
import lombok.NonNull;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.vripper.jpa.domain.*;
|
||||
import me.vripper.jpa.domain.enums.Status;
|
||||
import me.vripper.jpa.repositories.IImageRepository;
|
||||
import me.vripper.jpa.repositories.IMetadataRepository;
|
||||
import me.vripper.jpa.repositories.IPostRepository;
|
||||
import me.vripper.jpa.repositories.IQueuedRepository;
|
||||
import me.vripper.jpa.repositories.impl.LogEventRepository;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import tn.mnlr.vripper.jpa.domain.*;
|
||||
import tn.mnlr.vripper.jpa.domain.enums.Status;
|
||||
import tn.mnlr.vripper.jpa.repositories.IImageRepository;
|
||||
import tn.mnlr.vripper.jpa.repositories.IMetadataRepository;
|
||||
import tn.mnlr.vripper.jpa.repositories.IPostRepository;
|
||||
import tn.mnlr.vripper.jpa.repositories.IQueuedRepository;
|
||||
import tn.mnlr.vripper.jpa.repositories.impl.LogEventRepository;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
+4
-5
@@ -1,13 +1,12 @@
|
||||
package tn.mnlr.vripper.services;
|
||||
package me.vripper.services;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
import lombok.Getter;
|
||||
import me.vripper.event.Event;
|
||||
import me.vripper.event.EventBus;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Service;
|
||||
import tn.mnlr.vripper.event.Event;
|
||||
import tn.mnlr.vripper.event.EventBus;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
|
||||
@Service
|
||||
@EnableScheduling
|
||||
+5
-5
@@ -1,14 +1,14 @@
|
||||
package tn.mnlr.vripper.services;
|
||||
package me.vripper.services;
|
||||
|
||||
import lombok.Getter;
|
||||
import me.vripper.download.DownloadService;
|
||||
import me.vripper.event.Event;
|
||||
import me.vripper.event.EventBus;
|
||||
import me.vripper.services.domain.GlobalState;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Service;
|
||||
import tn.mnlr.vripper.download.DownloadService;
|
||||
import tn.mnlr.vripper.event.Event;
|
||||
import tn.mnlr.vripper.event.EventBus;
|
||||
import tn.mnlr.vripper.services.domain.GlobalState;
|
||||
|
||||
@Service
|
||||
@EnableScheduling
|
||||
+6
-7
@@ -1,7 +1,12 @@
|
||||
package tn.mnlr.vripper.services;
|
||||
package me.vripper.services;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import lombok.Getter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.vripper.exception.HostException;
|
||||
import me.vripper.exception.HtmlProcessorException;
|
||||
import org.apache.http.Header;
|
||||
import org.apache.http.client.HttpClient;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
@@ -11,12 +16,6 @@ import org.apache.http.util.EntityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.w3c.dom.Document;
|
||||
import tn.mnlr.vripper.exception.HostException;
|
||||
import tn.mnlr.vripper.exception.HtmlProcessorException;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
+2
-2
@@ -1,12 +1,12 @@
|
||||
package tn.mnlr.vripper.services;
|
||||
package me.vripper.services;
|
||||
|
||||
import me.vripper.exception.HtmlProcessorException;
|
||||
import org.htmlcleaner.CleanerProperties;
|
||||
import org.htmlcleaner.DomSerializer;
|
||||
import org.htmlcleaner.HtmlCleaner;
|
||||
import org.htmlcleaner.TagNode;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.w3c.dom.Document;
|
||||
import tn.mnlr.vripper.exception.HtmlProcessorException;
|
||||
|
||||
@Service
|
||||
public class HtmlProcessorService {
|
||||
+5
-6
@@ -1,14 +1,13 @@
|
||||
package tn.mnlr.vripper.services;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import tn.mnlr.vripper.jpa.domain.Post;
|
||||
import tn.mnlr.vripper.tasks.MetadataRunnable;
|
||||
package me.vripper.services;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.vripper.jpa.domain.Post;
|
||||
import me.vripper.tasks.MetadataRunnable;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
+8
-9
@@ -1,18 +1,17 @@
|
||||
package tn.mnlr.vripper.services;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.NonNull;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import tn.mnlr.vripper.exception.RenameException;
|
||||
import tn.mnlr.vripper.jpa.domain.Post;
|
||||
import tn.mnlr.vripper.services.domain.Settings;
|
||||
package me.vripper.services;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.StandardCopyOption;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
import lombok.Getter;
|
||||
import lombok.NonNull;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.vripper.exception.RenameException;
|
||||
import me.vripper.jpa.domain.Post;
|
||||
import me.vripper.services.domain.Settings;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
+13
-14
@@ -1,23 +1,22 @@
|
||||
package tn.mnlr.vripper.services;
|
||||
package me.vripper.services;
|
||||
|
||||
import com.github.benmanes.caffeine.cache.Caffeine;
|
||||
import com.github.benmanes.caffeine.cache.LoadingCache;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import reactor.core.Disposable;
|
||||
import tn.mnlr.vripper.event.Event;
|
||||
import tn.mnlr.vripper.event.EventBus;
|
||||
import tn.mnlr.vripper.jpa.domain.Queued;
|
||||
import tn.mnlr.vripper.services.domain.MultiPostScanParser;
|
||||
import tn.mnlr.vripper.services.domain.MultiPostScanResult;
|
||||
import tn.mnlr.vripper.tasks.AddPostRunnable;
|
||||
import tn.mnlr.vripper.tasks.AddQueuedRunnable;
|
||||
|
||||
import javax.annotation.PreDestroy;
|
||||
import jakarta.annotation.PreDestroy;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.vripper.event.Event;
|
||||
import me.vripper.event.EventBus;
|
||||
import me.vripper.jpa.domain.Queued;
|
||||
import me.vripper.services.domain.MultiPostScanParser;
|
||||
import me.vripper.services.domain.MultiPostScanResult;
|
||||
import me.vripper.tasks.AddPostRunnable;
|
||||
import me.vripper.tasks.AddQueuedRunnable;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import reactor.core.Disposable;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
+18
-19
@@ -1,25 +1,13 @@
|
||||
package tn.mnlr.vripper.services;
|
||||
package me.vripper.services;
|
||||
|
||||
import static java.nio.file.StandardOpenOption.*;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.codec.digest.DigestUtils;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
import tn.mnlr.vripper.SpringContext;
|
||||
import tn.mnlr.vripper.event.Event;
|
||||
import tn.mnlr.vripper.event.EventBus;
|
||||
import tn.mnlr.vripper.exception.ValidationException;
|
||||
import tn.mnlr.vripper.services.domain.Settings;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.annotation.PreDestroy;
|
||||
import jakarta.annotation.PostConstruct;
|
||||
import jakarta.annotation.PreDestroy;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
@@ -31,8 +19,19 @@ import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import static java.nio.file.StandardOpenOption.*;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.vripper.SpringContext;
|
||||
import me.vripper.event.Event;
|
||||
import me.vripper.event.EventBus;
|
||||
import me.vripper.exception.ValidationException;
|
||||
import me.vripper.services.domain.Settings;
|
||||
import org.apache.commons.codec.digest.DigestUtils;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
@Setter
|
||||
+3
-4
@@ -1,11 +1,10 @@
|
||||
package tn.mnlr.vripper.services;
|
||||
|
||||
import lombok.Getter;
|
||||
import org.springframework.stereotype.Service;
|
||||
package me.vripper.services;
|
||||
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import lombok.Getter;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class ThreadPoolService {
|
||||
+10
-11
@@ -1,7 +1,16 @@
|
||||
package tn.mnlr.vripper.services;
|
||||
package me.vripper.services;
|
||||
|
||||
import jakarta.annotation.PostConstruct;
|
||||
import jakarta.annotation.PreDestroy;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import lombok.Getter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.vripper.event.Event;
|
||||
import me.vripper.event.EventBus;
|
||||
import me.vripper.exception.VripperException;
|
||||
import me.vripper.jpa.domain.Post;
|
||||
import me.vripper.tasks.LeaveThanksRunnable;
|
||||
import org.apache.http.NameValuePair;
|
||||
import org.apache.http.client.entity.UrlEncodedFormEntity;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
@@ -15,16 +24,6 @@ import org.apache.http.util.EntityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import reactor.core.Disposable;
|
||||
import tn.mnlr.vripper.event.Event;
|
||||
import tn.mnlr.vripper.event.EventBus;
|
||||
import tn.mnlr.vripper.exception.VripperException;
|
||||
import tn.mnlr.vripper.jpa.domain.Post;
|
||||
import tn.mnlr.vripper.tasks.LeaveThanksRunnable;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.annotation.PreDestroy;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
+5
-6
@@ -1,13 +1,12 @@
|
||||
package tn.mnlr.vripper.services;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.w3c.dom.Node;
|
||||
import org.w3c.dom.NodeList;
|
||||
import tn.mnlr.vripper.exception.XpathException;
|
||||
package me.vripper.services;
|
||||
|
||||
import javax.xml.xpath.XPath;
|
||||
import javax.xml.xpath.XPathConstants;
|
||||
import javax.xml.xpath.XPathFactory;
|
||||
import me.vripper.exception.XpathException;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.w3c.dom.Node;
|
||||
import org.w3c.dom.NodeList;
|
||||
|
||||
@Service
|
||||
public class XpathService {
|
||||
+2
-3
@@ -1,8 +1,7 @@
|
||||
package tn.mnlr.vripper.services.domain;
|
||||
|
||||
import lombok.Getter;
|
||||
package me.vripper.services.domain;
|
||||
|
||||
import java.util.Objects;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
public class DownloadSpeed {
|
||||
+2
-3
@@ -1,8 +1,7 @@
|
||||
package tn.mnlr.vripper.services.domain;
|
||||
|
||||
import lombok.Getter;
|
||||
package me.vripper.services.domain;
|
||||
|
||||
import java.util.Objects;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
public class GlobalState {
|
||||
+2
-3
@@ -1,8 +1,7 @@
|
||||
package tn.mnlr.vripper.services.domain;
|
||||
|
||||
import lombok.Getter;
|
||||
package me.vripper.services.domain;
|
||||
|
||||
import java.util.List;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
public class MultiPostItem {
|
||||
+7
-8
@@ -1,15 +1,14 @@
|
||||
package tn.mnlr.vripper.services.domain;
|
||||
|
||||
import org.xml.sax.Attributes;
|
||||
import org.xml.sax.helpers.DefaultHandler;
|
||||
import tn.mnlr.vripper.SpringContext;
|
||||
import tn.mnlr.vripper.host.Host;
|
||||
import tn.mnlr.vripper.jpa.domain.Queued;
|
||||
import tn.mnlr.vripper.services.SettingsService;
|
||||
package me.vripper.services.domain;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.stream.Collectors;
|
||||
import me.vripper.SpringContext;
|
||||
import me.vripper.host.Host;
|
||||
import me.vripper.jpa.domain.Queued;
|
||||
import me.vripper.services.SettingsService;
|
||||
import org.xml.sax.Attributes;
|
||||
import org.xml.sax.helpers.DefaultHandler;
|
||||
|
||||
public class MultiPostScanHandler extends DefaultHandler {
|
||||
|
||||
+12
-13
@@ -1,24 +1,23 @@
|
||||
package tn.mnlr.vripper.services.domain;
|
||||
package me.vripper.services.domain;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.net.URISyntaxException;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import javax.xml.parsers.SAXParserFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.vripper.SpringContext;
|
||||
import me.vripper.exception.DownloadException;
|
||||
import me.vripper.exception.PostParseException;
|
||||
import me.vripper.jpa.domain.Queued;
|
||||
import me.vripper.services.ConnectionService;
|
||||
import me.vripper.services.SettingsService;
|
||||
import me.vripper.services.VGAuthService;
|
||||
import net.jodah.failsafe.Failsafe;
|
||||
import org.apache.http.client.HttpClient;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
import org.apache.http.client.methods.HttpGet;
|
||||
import org.apache.http.client.utils.URIBuilder;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
import tn.mnlr.vripper.SpringContext;
|
||||
import tn.mnlr.vripper.exception.DownloadException;
|
||||
import tn.mnlr.vripper.exception.PostParseException;
|
||||
import tn.mnlr.vripper.jpa.domain.Queued;
|
||||
import tn.mnlr.vripper.services.ConnectionService;
|
||||
import tn.mnlr.vripper.services.SettingsService;
|
||||
import tn.mnlr.vripper.services.VGAuthService;
|
||||
|
||||
import javax.xml.parsers.SAXParserFactory;
|
||||
import java.io.BufferedInputStream;
|
||||
import java.net.URISyntaxException;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
@Slf4j
|
||||
public class MultiPostScanParser {
|
||||
+2
-3
@@ -1,8 +1,7 @@
|
||||
package tn.mnlr.vripper.services.domain;
|
||||
|
||||
import lombok.Getter;
|
||||
package me.vripper.services.domain;
|
||||
|
||||
import java.util.List;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
public class MultiPostScanResult {
|
||||
+12
-14
@@ -1,19 +1,18 @@
|
||||
package tn.mnlr.vripper.services.domain;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.xml.sax.Attributes;
|
||||
import org.xml.sax.helpers.DefaultHandler;
|
||||
import tn.mnlr.vripper.SpringContext;
|
||||
import tn.mnlr.vripper.host.Host;
|
||||
import tn.mnlr.vripper.jpa.domain.Image;
|
||||
import tn.mnlr.vripper.jpa.domain.Post;
|
||||
import tn.mnlr.vripper.services.SettingsService;
|
||||
package me.vripper.services.domain;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.vripper.SpringContext;
|
||||
import me.vripper.host.Host;
|
||||
import me.vripper.jpa.domain.Image;
|
||||
import me.vripper.jpa.domain.Post;
|
||||
import me.vripper.services.SettingsService;
|
||||
import org.xml.sax.Attributes;
|
||||
import org.xml.sax.helpers.DefaultHandler;
|
||||
|
||||
@Slf4j
|
||||
class PostScanHandler extends DefaultHandler {
|
||||
@@ -72,10 +71,9 @@ class PostScanHandler extends DefaultHandler {
|
||||
break;
|
||||
case "image":
|
||||
index++;
|
||||
String thumbUrl = attributes.getValue("thumb_url").trim();
|
||||
if (previews.size() < 4) {
|
||||
Optional.ofNullable(attributes.getValue("thumb_url"))
|
||||
.map(String::trim)
|
||||
.ifPresent(previews::add);
|
||||
previews.add(thumbUrl);
|
||||
}
|
||||
|
||||
String mainUrl =
|
||||
@@ -91,7 +89,7 @@ class PostScanHandler extends DefaultHandler {
|
||||
String.format(
|
||||
"Found supported host %s for %s",
|
||||
foundHost.getClass().getSimpleName(), mainUrl));
|
||||
images.add(new Image(postId, mainUrl, foundHost, index));
|
||||
images.add(new Image(postId, mainUrl, thumbUrl, foundHost, index));
|
||||
} else {
|
||||
log.warn(String.format("unsupported host for %s, skipping", mainUrl));
|
||||
}
|
||||
+10
-11
@@ -1,22 +1,21 @@
|
||||
package tn.mnlr.vripper.services.domain;
|
||||
package me.vripper.services.domain;
|
||||
|
||||
import java.net.URISyntaxException;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import javax.xml.parsers.SAXParserFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.vripper.SpringContext;
|
||||
import me.vripper.exception.DownloadException;
|
||||
import me.vripper.exception.PostParseException;
|
||||
import me.vripper.services.ConnectionService;
|
||||
import me.vripper.services.SettingsService;
|
||||
import me.vripper.services.VGAuthService;
|
||||
import net.jodah.failsafe.Failsafe;
|
||||
import org.apache.http.client.HttpClient;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
import org.apache.http.client.methods.HttpGet;
|
||||
import org.apache.http.client.utils.URIBuilder;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
import tn.mnlr.vripper.SpringContext;
|
||||
import tn.mnlr.vripper.exception.DownloadException;
|
||||
import tn.mnlr.vripper.exception.PostParseException;
|
||||
import tn.mnlr.vripper.services.ConnectionService;
|
||||
import tn.mnlr.vripper.services.SettingsService;
|
||||
import tn.mnlr.vripper.services.VGAuthService;
|
||||
|
||||
import javax.xml.parsers.SAXParserFactory;
|
||||
import java.net.URISyntaxException;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
@Slf4j
|
||||
public class PostScanParser {
|
||||
+4
-5
@@ -1,11 +1,10 @@
|
||||
package tn.mnlr.vripper.services.domain;
|
||||
|
||||
import lombok.Getter;
|
||||
import tn.mnlr.vripper.jpa.domain.Image;
|
||||
import tn.mnlr.vripper.jpa.domain.Post;
|
||||
package me.vripper.services.domain;
|
||||
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import lombok.Getter;
|
||||
import me.vripper.jpa.domain.Image;
|
||||
import me.vripper.jpa.domain.Post;
|
||||
|
||||
public class PostScanResult {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package tn.mnlr.vripper.services.domain;
|
||||
package me.vripper.services.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
+19
-20
@@ -1,28 +1,27 @@
|
||||
package tn.mnlr.vripper.tasks;
|
||||
package me.vripper.tasks;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import tn.mnlr.vripper.SpringContext;
|
||||
import tn.mnlr.vripper.Utils;
|
||||
import tn.mnlr.vripper.download.DownloadService;
|
||||
import tn.mnlr.vripper.exception.PostParseException;
|
||||
import tn.mnlr.vripper.jpa.domain.Image;
|
||||
import tn.mnlr.vripper.jpa.domain.LogEvent;
|
||||
import tn.mnlr.vripper.jpa.domain.Post;
|
||||
import tn.mnlr.vripper.jpa.domain.enums.Status;
|
||||
import tn.mnlr.vripper.jpa.repositories.ILogEventRepository;
|
||||
import tn.mnlr.vripper.services.DataService;
|
||||
import tn.mnlr.vripper.services.MetadataService;
|
||||
import tn.mnlr.vripper.services.SettingsService;
|
||||
import tn.mnlr.vripper.services.VGAuthService;
|
||||
import tn.mnlr.vripper.services.domain.PostScanParser;
|
||||
import tn.mnlr.vripper.services.domain.PostScanResult;
|
||||
import static me.vripper.jpa.domain.LogEvent.Status.ERROR;
|
||||
import static me.vripper.jpa.domain.LogEvent.Status.PROCESSING;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import static tn.mnlr.vripper.jpa.domain.LogEvent.Status.ERROR;
|
||||
import static tn.mnlr.vripper.jpa.domain.LogEvent.Status.PROCESSING;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.vripper.SpringContext;
|
||||
import me.vripper.Utils;
|
||||
import me.vripper.download.DownloadService;
|
||||
import me.vripper.exception.PostParseException;
|
||||
import me.vripper.jpa.domain.Image;
|
||||
import me.vripper.jpa.domain.LogEvent;
|
||||
import me.vripper.jpa.domain.Post;
|
||||
import me.vripper.jpa.domain.enums.Status;
|
||||
import me.vripper.jpa.repositories.ILogEventRepository;
|
||||
import me.vripper.services.DataService;
|
||||
import me.vripper.services.MetadataService;
|
||||
import me.vripper.services.SettingsService;
|
||||
import me.vripper.services.VGAuthService;
|
||||
import me.vripper.services.domain.PostScanParser;
|
||||
import me.vripper.services.domain.PostScanResult;
|
||||
|
||||
@Slf4j
|
||||
public class AddPostRunnable implements Runnable {
|
||||
+13
-14
@@ -1,20 +1,19 @@
|
||||
package tn.mnlr.vripper.tasks;
|
||||
package me.vripper.tasks;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import tn.mnlr.vripper.SpringContext;
|
||||
import tn.mnlr.vripper.Utils;
|
||||
import tn.mnlr.vripper.jpa.domain.LogEvent;
|
||||
import tn.mnlr.vripper.jpa.domain.Queued;
|
||||
import tn.mnlr.vripper.jpa.repositories.ILogEventRepository;
|
||||
import tn.mnlr.vripper.services.DataService;
|
||||
import tn.mnlr.vripper.services.PostService;
|
||||
import tn.mnlr.vripper.services.ThreadPoolService;
|
||||
import tn.mnlr.vripper.services.domain.MultiPostScanResult;
|
||||
import static me.vripper.jpa.domain.LogEvent.Status.ERROR;
|
||||
import static me.vripper.jpa.domain.LogEvent.Status.PROCESSING;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static tn.mnlr.vripper.jpa.domain.LogEvent.Status.ERROR;
|
||||
import static tn.mnlr.vripper.jpa.domain.LogEvent.Status.PROCESSING;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.vripper.SpringContext;
|
||||
import me.vripper.Utils;
|
||||
import me.vripper.jpa.domain.LogEvent;
|
||||
import me.vripper.jpa.domain.Queued;
|
||||
import me.vripper.jpa.repositories.ILogEventRepository;
|
||||
import me.vripper.services.DataService;
|
||||
import me.vripper.services.PostService;
|
||||
import me.vripper.services.ThreadPoolService;
|
||||
import me.vripper.services.domain.MultiPostScanResult;
|
||||
|
||||
@Slf4j
|
||||
public class AddQueuedRunnable implements Runnable {
|
||||
+13
-14
@@ -1,6 +1,18 @@
|
||||
package tn.mnlr.vripper.tasks;
|
||||
package me.vripper.tasks;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.vripper.SpringContext;
|
||||
import me.vripper.Utils;
|
||||
import me.vripper.jpa.domain.LogEvent;
|
||||
import me.vripper.jpa.domain.Post;
|
||||
import me.vripper.jpa.repositories.ILogEventRepository;
|
||||
import me.vripper.services.ConnectionService;
|
||||
import me.vripper.services.DataService;
|
||||
import me.vripper.services.SettingsService;
|
||||
import org.apache.http.NameValuePair;
|
||||
import org.apache.http.client.entity.UrlEncodedFormEntity;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
@@ -9,19 +21,6 @@ import org.apache.http.client.protocol.HttpClientContext;
|
||||
import org.apache.http.impl.client.CloseableHttpClient;
|
||||
import org.apache.http.message.BasicNameValuePair;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
import tn.mnlr.vripper.SpringContext;
|
||||
import tn.mnlr.vripper.Utils;
|
||||
import tn.mnlr.vripper.jpa.domain.LogEvent;
|
||||
import tn.mnlr.vripper.jpa.domain.Post;
|
||||
import tn.mnlr.vripper.jpa.repositories.ILogEventRepository;
|
||||
import tn.mnlr.vripper.services.ConnectionService;
|
||||
import tn.mnlr.vripper.services.DataService;
|
||||
import tn.mnlr.vripper.services.SettingsService;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
public class LeaveThanksRunnable implements Runnable {
|
||||
+11
-12
@@ -1,22 +1,21 @@
|
||||
package tn.mnlr.vripper.tasks;
|
||||
package me.vripper.tasks;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.lang.NonNull;
|
||||
import tn.mnlr.vripper.SpringContext;
|
||||
import tn.mnlr.vripper.Utils;
|
||||
import tn.mnlr.vripper.jpa.domain.LogEvent;
|
||||
import tn.mnlr.vripper.jpa.domain.Queued;
|
||||
import tn.mnlr.vripper.jpa.repositories.impl.LogEventRepository;
|
||||
import tn.mnlr.vripper.services.PostService;
|
||||
import tn.mnlr.vripper.services.SettingsService;
|
||||
import static me.vripper.jpa.domain.LogEvent.Status.ERROR;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import static tn.mnlr.vripper.jpa.domain.LogEvent.Status.ERROR;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.vripper.SpringContext;
|
||||
import me.vripper.Utils;
|
||||
import me.vripper.jpa.domain.LogEvent;
|
||||
import me.vripper.jpa.domain.Queued;
|
||||
import me.vripper.jpa.repositories.impl.LogEventRepository;
|
||||
import me.vripper.services.PostService;
|
||||
import me.vripper.services.SettingsService;
|
||||
import org.springframework.lang.NonNull;
|
||||
|
||||
@Slf4j
|
||||
public class LinkScanRunnable implements Runnable {
|
||||
+24
-25
@@ -1,27 +1,6 @@
|
||||
package tn.mnlr.vripper.tasks;
|
||||
package me.vripper.tasks;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.NonNull;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.jodah.failsafe.Failsafe;
|
||||
import org.apache.http.client.HttpClient;
|
||||
import org.apache.http.client.methods.AbstractExecutionAwareRequest;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
import org.apache.http.client.methods.HttpGet;
|
||||
import org.apache.http.client.protocol.HttpClientContext;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Node;
|
||||
import tn.mnlr.vripper.SpringContext;
|
||||
import tn.mnlr.vripper.Utils;
|
||||
import tn.mnlr.vripper.download.DownloadJob;
|
||||
import tn.mnlr.vripper.exception.DownloadException;
|
||||
import tn.mnlr.vripper.exception.PostParseException;
|
||||
import tn.mnlr.vripper.jpa.domain.LogEvent;
|
||||
import tn.mnlr.vripper.jpa.domain.Metadata;
|
||||
import tn.mnlr.vripper.jpa.domain.Post;
|
||||
import tn.mnlr.vripper.jpa.repositories.ILogEventRepository;
|
||||
import tn.mnlr.vripper.services.*;
|
||||
import static me.vripper.jpa.domain.LogEvent.Status.ERROR;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
@@ -31,8 +10,28 @@ import java.util.List;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static tn.mnlr.vripper.jpa.domain.LogEvent.Status.ERROR;
|
||||
import lombok.Getter;
|
||||
import lombok.NonNull;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.vripper.SpringContext;
|
||||
import me.vripper.Utils;
|
||||
import me.vripper.download.DownloadJob;
|
||||
import me.vripper.exception.DownloadException;
|
||||
import me.vripper.exception.PostParseException;
|
||||
import me.vripper.jpa.domain.LogEvent;
|
||||
import me.vripper.jpa.domain.Metadata;
|
||||
import me.vripper.jpa.domain.Post;
|
||||
import me.vripper.jpa.repositories.ILogEventRepository;
|
||||
import me.vripper.services.*;
|
||||
import net.jodah.failsafe.Failsafe;
|
||||
import org.apache.http.client.HttpClient;
|
||||
import org.apache.http.client.methods.AbstractExecutionAwareRequest;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
import org.apache.http.client.methods.HttpGet;
|
||||
import org.apache.http.client.protocol.HttpClientContext;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
@Slf4j
|
||||
public class MetadataRunnable implements Runnable {
|
||||
+2
-2
@@ -1,12 +1,12 @@
|
||||
package tn.mnlr.vripper.web.restendpoints;
|
||||
package me.vripper.web.restendpoints;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.vripper.jpa.repositories.ILogEventRepository;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.web.bind.annotation.CrossOrigin;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseStatus;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import tn.mnlr.vripper.jpa.repositories.ILogEventRepository;
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
+19
-20
@@ -1,29 +1,28 @@
|
||||
package tn.mnlr.vripper.web.restendpoints;
|
||||
|
||||
import lombok.NonNull;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import tn.mnlr.vripper.download.DownloadService;
|
||||
import tn.mnlr.vripper.jpa.domain.Metadata;
|
||||
import tn.mnlr.vripper.jpa.domain.Post;
|
||||
import tn.mnlr.vripper.jpa.domain.Queued;
|
||||
import tn.mnlr.vripper.services.*;
|
||||
import tn.mnlr.vripper.services.domain.MultiPostItem;
|
||||
import tn.mnlr.vripper.services.domain.MultiPostScanResult;
|
||||
import tn.mnlr.vripper.tasks.AddPostRunnable;
|
||||
import tn.mnlr.vripper.tasks.LinkScanRunnable;
|
||||
import tn.mnlr.vripper.web.restendpoints.domain.*;
|
||||
import tn.mnlr.vripper.web.restendpoints.exceptions.BadRequestException;
|
||||
import tn.mnlr.vripper.web.restendpoints.exceptions.NotFoundException;
|
||||
import tn.mnlr.vripper.web.restendpoints.exceptions.ServerErrorException;
|
||||
package me.vripper.web.restendpoints;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
import lombok.NonNull;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.vripper.download.DownloadService;
|
||||
import me.vripper.jpa.domain.Metadata;
|
||||
import me.vripper.jpa.domain.Post;
|
||||
import me.vripper.jpa.domain.Queued;
|
||||
import me.vripper.services.*;
|
||||
import me.vripper.services.domain.MultiPostItem;
|
||||
import me.vripper.services.domain.MultiPostScanResult;
|
||||
import me.vripper.tasks.AddPostRunnable;
|
||||
import me.vripper.tasks.LinkScanRunnable;
|
||||
import me.vripper.web.restendpoints.domain.*;
|
||||
import me.vripper.web.restendpoints.exceptions.BadRequestException;
|
||||
import me.vripper.web.restendpoints.exceptions.NotFoundException;
|
||||
import me.vripper.web.restendpoints.exceptions.ServerErrorException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
+6
-7
@@ -1,15 +1,14 @@
|
||||
package tn.mnlr.vripper.web.restendpoints;
|
||||
package me.vripper.web.restendpoints;
|
||||
|
||||
import java.util.List;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.vripper.exception.ValidationException;
|
||||
import me.vripper.services.SettingsService;
|
||||
import me.vripper.services.domain.Settings;
|
||||
import me.vripper.web.restendpoints.exceptions.BadRequestException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import tn.mnlr.vripper.exception.ValidationException;
|
||||
import tn.mnlr.vripper.services.SettingsService;
|
||||
import tn.mnlr.vripper.services.domain.Settings;
|
||||
import tn.mnlr.vripper.web.restendpoints.exceptions.BadRequestException;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@Slf4j
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package tn.mnlr.vripper.web.restendpoints;
|
||||
package me.vripper.web.restendpoints;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package tn.mnlr.vripper.web.restendpoints.domain;
|
||||
package me.vripper.web.restendpoints.domain;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package tn.mnlr.vripper.web.restendpoints.domain;
|
||||
package me.vripper.web.restendpoints.domain;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package tn.mnlr.vripper.web.restendpoints.domain;
|
||||
package me.vripper.web.restendpoints.domain;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package tn.mnlr.vripper.web.restendpoints.domain;
|
||||
package me.vripper.web.restendpoints.domain;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
+2
-3
@@ -1,12 +1,11 @@
|
||||
package tn.mnlr.vripper.web.restendpoints.domain;
|
||||
package me.vripper.web.restendpoints.domain;
|
||||
|
||||
import java.util.List;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package tn.mnlr.vripper.web.restendpoints.domain;
|
||||
package me.vripper.web.restendpoints.domain;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package tn.mnlr.vripper.web.restendpoints.domain;
|
||||
package me.vripper.web.restendpoints.domain;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package tn.mnlr.vripper.web.restendpoints.domain;
|
||||
package me.vripper.web.restendpoints.domain;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user