mirror of
https://github.com/RipMeApp/ripme.git
synced 2025-08-29 16:50:10 +02:00
remove unused
This commit is contained in:
@@ -13,8 +13,6 @@ import org.jsoup.nodes.Document;
|
|||||||
import org.jsoup.nodes.Element;
|
import org.jsoup.nodes.Element;
|
||||||
|
|
||||||
public class MyhentaicomicsRipper extends AbstractHTMLRipper {
|
public class MyhentaicomicsRipper extends AbstractHTMLRipper {
|
||||||
private static boolean isTag;
|
|
||||||
|
|
||||||
public MyhentaicomicsRipper(URL url) throws IOException {
|
public MyhentaicomicsRipper(URL url) throws IOException {
|
||||||
super(url);
|
super(url);
|
||||||
}
|
}
|
||||||
@@ -69,7 +67,6 @@ public class MyhentaicomicsRipper extends AbstractHTMLRipper {
|
|||||||
Pattern pat = Pattern.compile("^https?://myhentaicomics.com/index.php/tag/([0-9]*)/?([a-zA-Z%0-9+?=:]*)?$");
|
Pattern pat = Pattern.compile("^https?://myhentaicomics.com/index.php/tag/([0-9]*)/?([a-zA-Z%0-9+?=:]*)?$");
|
||||||
Matcher mat = pat.matcher(url.toExternalForm());
|
Matcher mat = pat.matcher(url.toExternalForm());
|
||||||
if (mat.matches()) {
|
if (mat.matches()) {
|
||||||
isTag = true;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@@ -120,7 +120,7 @@ public class ScrolllerRipper extends AbstractJSONRipper {
|
|||||||
try {
|
try {
|
||||||
String url = "https://api.scrolller.com/api/v2/graphql";
|
String url = "https://api.scrolller.com/api/v2/graphql";
|
||||||
|
|
||||||
URL obj = new URL(url);
|
URL obj = new URI(url).toURL();
|
||||||
HttpURLConnection conn = (HttpURLConnection) obj.openConnection();
|
HttpURLConnection conn = (HttpURLConnection) obj.openConnection();
|
||||||
conn.setReadTimeout(5000);
|
conn.setReadTimeout(5000);
|
||||||
conn.addRequestProperty("Accept-Language", "en-US,en;q=0.8");
|
conn.addRequestProperty("Accept-Language", "en-US,en;q=0.8");
|
||||||
|
@@ -1,6 +1,8 @@
|
|||||||
package com.rarchives.ripme.tst;
|
package com.rarchives.ripme.tst;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.net.URI;
|
||||||
|
import java.net.URISyntaxException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import com.rarchives.ripme.utils.Proxy;
|
import com.rarchives.ripme.utils.Proxy;
|
||||||
import com.rarchives.ripme.utils.Utils;
|
import com.rarchives.ripme.utils.Utils;
|
||||||
@@ -14,12 +16,12 @@ public class proxyTest {
|
|||||||
|
|
||||||
// This test will only run on machines where the user has added a entry for proxy.socks
|
// This test will only run on machines where the user has added a entry for proxy.socks
|
||||||
@Test
|
@Test
|
||||||
public void testSocksProxy() throws IOException {
|
public void testSocksProxy() throws IOException, URISyntaxException {
|
||||||
// Unset proxy before testing
|
// Unset proxy before testing
|
||||||
System.setProperty("http.proxyHost", "");
|
System.setProperty("http.proxyHost", "");
|
||||||
System.setProperty("https.proxyHost", "");
|
System.setProperty("https.proxyHost", "");
|
||||||
System.setProperty("socksProxyHost", "");
|
System.setProperty("socksProxyHost", "");
|
||||||
URL url = new URL("https://icanhazip.com");
|
URL url = new URI("https://icanhazip.com").toURL();
|
||||||
String proxyConfig = Utils.getConfigString("proxy.socks", "");
|
String proxyConfig = Utils.getConfigString("proxy.socks", "");
|
||||||
if (!proxyConfig.equals("")) {
|
if (!proxyConfig.equals("")) {
|
||||||
String ip1 = Http.url(url).ignoreContentType().get().text();
|
String ip1 = Http.url(url).ignoreContentType().get().text();
|
||||||
@@ -34,12 +36,12 @@ public class proxyTest {
|
|||||||
|
|
||||||
// This test will only run on machines where the user has added a entry for proxy.http
|
// This test will only run on machines where the user has added a entry for proxy.http
|
||||||
@Test
|
@Test
|
||||||
public void testHTTPProxy() throws IOException {
|
public void testHTTPProxy() throws IOException, URISyntaxException {
|
||||||
// Unset proxy before testing
|
// Unset proxy before testing
|
||||||
System.setProperty("http.proxyHost", "");
|
System.setProperty("http.proxyHost", "");
|
||||||
System.setProperty("https.proxyHost", "");
|
System.setProperty("https.proxyHost", "");
|
||||||
System.setProperty("socksProxyHost", "");
|
System.setProperty("socksProxyHost", "");
|
||||||
URL url = new URL("https://icanhazip.com");
|
URL url = new URI("https://icanhazip.com").toURL();
|
||||||
String proxyConfig = Utils.getConfigString("proxy.http", "");
|
String proxyConfig = Utils.getConfigString("proxy.http", "");
|
||||||
if (!proxyConfig.equals("")) {
|
if (!proxyConfig.equals("")) {
|
||||||
String ip1 = Http.url(url).ignoreContentType().get().text();
|
String ip1 = Http.url(url).ignoreContentType().get().text();
|
||||||
|
@@ -1,6 +1,8 @@
|
|||||||
package com.rarchives.ripme.tst.ripper.rippers;
|
package com.rarchives.ripme.tst.ripper.rippers;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.net.URI;
|
||||||
|
import java.net.URISyntaxException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
|
|
||||||
import com.rarchives.ripme.ripper.rippers.ModelxRipper;
|
import com.rarchives.ripme.ripper.rippers.ModelxRipper;
|
||||||
@@ -11,11 +13,10 @@ import org.junit.jupiter.api.Test;
|
|||||||
public class ModelxRipperTest extends RippersTest {
|
public class ModelxRipperTest extends RippersTest {
|
||||||
@Test
|
@Test
|
||||||
@Disabled("ModelxRipper domain has been changes. Commenting to avoid build failure.")
|
@Disabled("ModelxRipper domain has been changes. Commenting to avoid build failure.")
|
||||||
public void testModelxAlbum() throws IOException {
|
public void testModelxAlbum() throws IOException, URISyntaxException {
|
||||||
ModelxRipper ripper = new ModelxRipper(new URL(
|
URL url = new URI("http://www.modelx.org/graphis-collection-2002-2016/ai-yuzuki-%e6%9f%9a%e6%9c%88%e3%81%82%e3%81%84-yuzuiro/").toURL();
|
||||||
"http://www.modelx.org/graphis-collection-2002-2016/ai-yuzuki-%e6%9f%9a%e6%9c%88%e3%81%82%e3%81%84-yuzuiro/"));
|
ModelxRipper ripper = new ModelxRipper(url);
|
||||||
System.out.println(ripper.getGID(new URL(
|
System.out.println(ripper.getGID(url));
|
||||||
"http://www.modelx.org/graphis-collection-2002-2016/ai-yuzuki-%e6%9f%9a%e6%9c%88%e3%81%82%e3%81%84-yuzuiro/")));
|
|
||||||
testRipper(ripper);
|
testRipper(ripper);
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -3,7 +3,6 @@ package com.rarchives.ripme.tst.ripper.rippers;
|
|||||||
import com.rarchives.ripme.ripper.rippers.VscoRipper;
|
import com.rarchives.ripme.ripper.rippers.VscoRipper;
|
||||||
|
|
||||||
import org.junit.jupiter.api.Assertions;
|
import org.junit.jupiter.api.Assertions;
|
||||||
import org.junit.jupiter.api.Tag;
|
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
Reference in New Issue
Block a user