Merge pull request #547 from cyian-1756/rule34RipperFix
Added canRip for rule34.xxx
This commit is contained in:
commit
a690710a35
@ -33,6 +33,16 @@ public class Rule34Ripper extends AbstractHTMLRipper {
|
|||||||
return "rule34.xxx";
|
return "rule34.xxx";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canRip(URL url){
|
||||||
|
Pattern p = Pattern.compile("https?://rule34.xxx/index.php\\?page=post&s=list&tags=([\\S]+)");
|
||||||
|
Matcher m = p.matcher(url.toExternalForm());
|
||||||
|
if (m.matches()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getGID(URL url) throws MalformedURLException {
|
public String getGID(URL url) throws MalformedURLException {
|
||||||
Pattern p = Pattern.compile("https?://rule34.xxx/index.php\\?page=post&s=list&tags=([\\S]+)");
|
Pattern p = Pattern.compile("https?://rule34.xxx/index.php\\?page=post&s=list&tags=([\\S]+)");
|
||||||
@ -41,7 +51,7 @@ public class Rule34Ripper extends AbstractHTMLRipper {
|
|||||||
return m.group(1);
|
return m.group(1);
|
||||||
}
|
}
|
||||||
throw new MalformedURLException("Expected rule34.xxx URL format: " +
|
throw new MalformedURLException("Expected rule34.xxx URL format: " +
|
||||||
"rule34.xxx/index.php\\?page=post&s=list&tags=TAG - got " + url + " instead");
|
"rule34.xxx/index.php?page=post&s=list&tags=TAG - got " + url + " instead");
|
||||||
}
|
}
|
||||||
|
|
||||||
public URL getAPIUrl() throws MalformedURLException {
|
public URL getAPIUrl() throws MalformedURLException {
|
||||||
|
Loading…
Reference in New Issue
Block a user