Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ public String getGID(URL url) throws MalformedURLException {
}

private String getChapterID(String url) {
Pattern p = Pattern.compile("https://mangadex.org/chapter/([\\d]+)/([\\d+]?)");
Pattern p = Pattern.compile("https://(www\\.)?mangadex\\.org/chapter/([\\d]+)/([\\d+]?)");
Matcher m = p.matcher(url);
if (m.matches()) {
return m.group(1);
return m.group(3);
}
return null;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package com.rarchives.ripme.tst.ripper.rippers;


import com.rarchives.ripme.ripper.rippers.MangadexRipper;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;

import org.junit.jupiter.api.Test;

import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
Expand All @@ -19,9 +20,15 @@ public void testRip() throws IOException, URISyntaxException {

@Test
@Tag("flaky")
public void test2() throws IOException, URISyntaxException {
public void testRip2() throws IOException, URISyntaxException {
MangadexRipper ripper = new MangadexRipper(new URI("https://mangadex.org/title/44625/this-croc-will-die-in-100-days").toURL());
testRipper(ripper);
}

@Test
@Tag("flaky")
public void testAltUrlRip() throws IOException, URISyntaxException {
MangadexRipper ripper = new MangadexRipper(new URI("https://www.mangadex.org/chapter/804465/1").toURL());
testRipper(ripper);
}
}
Loading