1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-08-26 07:14:38 +02:00

Added ripper for xlecx.com

This commit is contained in:
Tushar
2019-02-06 13:41:58 +05:30
parent 3a9d451e8b
commit bea0dffd68
2 changed files with 49 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
package com.rarchives.ripme.ripper.rippers;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class XlecxRipper extends XcartxRipper {
private Pattern p = Pattern.compile("^https?://xlecx.com/([a-zA-Z0-9_\\-]+).html");
public XlecxRipper(URL url) throws IOException {
super(url);
}
@Override
public String getHost() {
return "xlecx";
}
@Override
public String getDomain() {
return "xlecx.com";
}
@Override
public String getGID(URL url) throws MalformedURLException {
Matcher m = p.matcher(url.toExternalForm());
if (m.matches()) {
return m.group(1);
}
throw new MalformedURLException("Expected URL format: http://xlecx.com/comic, got: " + url);
}
}

View File

@@ -0,0 +1,13 @@
package com.rarchives.ripme.tst.ripper.rippers;
import java.io.IOException;
import java.net.URL;
import com.rarchives.ripme.ripper.rippers.XlecxRipper;
public class XlecxRipperTest extends RippersTest {
public void testAlbum() throws IOException {
XlecxRipper ripper = new XlecxRipper(new URL("http://xlecx.com/4937-tokimeki-nioi.html"));
testRipper(ripper);
}
}