Fixed gonewild ripper regex

Triggered by URLs that resemble `gonewild:username` or `http://gonewild.com/username`
This commit is contained in:
4pr0n 2014-04-04 00:38:40 -07:00
parent 8a22035b89
commit 68ffc7f760
2 changed files with 7 additions and 1 deletions

View File

@ -34,7 +34,7 @@ public class GonewildRipper extends AbstractRipper {
}
private Matcher getUsernameMatcher(URL url) {
Pattern p = Pattern.compile("^https?://[a-z]{0,3}\\.?gonewild\\.com/(u|user)/([a-zA-Z0-9\\-]{3,})/?.*$");
Pattern p = Pattern.compile("^.*gonewild(\\.com?/|:)(user/)?([a-zA-Z0-9\\-_]{3,})[/?]?.*$");
return p.matcher(url.toExternalForm());
}

View File

@ -332,6 +332,12 @@ public class MainWindow implements Runnable, RipStatusHandler {
}
private Thread ripAlbum(String urlString) {
if (urlString.toLowerCase().startsWith("gonewild:")) {
urlString = "http://gonewild.com/user/" + urlString.substring(urlString.indexOf(':') + 1);
}
if (!urlString.startsWith("http")) {
urlString = "http://" + urlString;
}
URL url = null;
try {
url = new URL(urlString);