diff --git a/src/main/java/com/rarchives/ripme/ripper/rippers/HentaiCafeRipper.java b/src/main/java/com/rarchives/ripme/ripper/rippers/HentaiCafeRipper.java
deleted file mode 100644
index 5588c380..00000000
--- a/src/main/java/com/rarchives/ripme/ripper/rippers/HentaiCafeRipper.java
+++ /dev/null
@@ -1,78 +0,0 @@
-package com.rarchives.ripme.ripper.rippers;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.jsoup.nodes.Document;
-
-import com.rarchives.ripme.ripper.AbstractHTMLRipper;
-import com.rarchives.ripme.utils.Http;
-
-public class HentaiCafeRipper extends AbstractHTMLRipper {
-
- public HentaiCafeRipper(URL url) throws IOException {
- super(url);
- }
-
- @Override
- public String getHost() {
- return "hentai";
- }
-
- @Override
- public String getDomain() {
- return "hentai.cafe";
- }
-
- @Override
- public String getGID(URL url) throws MalformedURLException {
- Pattern p = Pattern.compile("https?://hentai\\.cafe/([a-zA-Z0-9_\\-%]*)/?$");
- Matcher m = p.matcher(url.toExternalForm());
- if (m.matches()) {
- return m.group(1);
- }
- throw new MalformedURLException("Expected hentai.cafe URL format: " +
- "hentai.cafe/COMIC - got " + url + " instead");
- }
-
- @Override
- public Document getFirstPage() throws IOException {
- // "url" is an instance field of the superclass
- Document tempDoc = Http.url(url).get();
- String firstPageUrl = tempDoc.select("div.last > p > a.x-btn").attr("href");
- // workaround for https://github.com/RipMeApp/ripme/issues/1083
- if (firstPageUrl.contains("
")) {
- firstPageUrl = firstPageUrl.replaceAll("
", "");
- }
- return Http.url(firstPageUrl).get();
- }
-
- @Override
- public Document getNextPage(Document doc) throws IOException {
- String nextPageURL = doc.select("div[id=page] > div.inner > a").attr("href");
- int totalPages = Integer.parseInt(doc.select("div.panel > div.topbar > div > div.topbar_right > div.tbtitle > div.text").text().replace(" ⤵", ""));
- String[] nextPageURLSplite = nextPageURL.split("/");
- // This checks if the next page number is greater than the total number of pages
- if (totalPages >= Integer.parseInt(nextPageURLSplite[nextPageURLSplite.length -1])) {
- return Http.url(nextPageURL).get();
- }
- throw new IOException("No more pages");
- }
-
- @Override
- public List getURLsFromPage(Document doc) {
- List result = new ArrayList<>();
- result.add(doc.select("div[id=page] > div.inner > a > img.open").attr("src"));
- return result;
- }
-
- @Override
- public void downloadURL(URL url, int index) {
- addURLToDownload(url, getPrefix(index));
- }
- }
diff --git a/src/test/java/com/rarchives/ripme/tst/ripper/rippers/HentaicafeRipperTest.java b/src/test/java/com/rarchives/ripme/tst/ripper/rippers/HentaicafeRipperTest.java
deleted file mode 100644
index e8c39d07..00000000
--- a/src/test/java/com/rarchives/ripme/tst/ripper/rippers/HentaicafeRipperTest.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package com.rarchives.ripme.tst.ripper.rippers;
-
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-
-import com.rarchives.ripme.ripper.rippers.HentaiCafeRipper;
-import org.junit.jupiter.api.Disabled;
-import org.junit.jupiter.api.Tag;
-import org.junit.jupiter.api.Test;
-
-public class HentaicafeRipperTest extends RippersTest {
- @Test
- @Tag("flaky")
- @Disabled("20/05/2021 This test was disabled as the site has experienced notable downtime")
- public void testHentaiCafeAlbum() throws IOException, URISyntaxException {
- HentaiCafeRipper ripper = new HentaiCafeRipper(new URI("https://hentai.cafe/kikuta-the-oni-in-the-room/").toURL());
- testRipper(ripper);
- }
- // This album has a line break (
) in the url. Test it to make sure ripme can handle these invalid urls
- @Test
- @Tag("flaky")
- @Disabled("20/05/2021 This test was disabled as the site has experienced notable downtime")
- public void testAlbumWithInvalidChars() throws IOException, URISyntaxException {
- HentaiCafeRipper ripper = new HentaiCafeRipper(new URI("https://hentai.cafe/chobipero-club/").toURL());
- testRipper(ripper);
-
- }
-}