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:
@@ -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);
|
||||
|
||||
}
|
||||
}
|
@@ -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);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user