Fixed gonewild ripper regex
Triggered by URLs that resemble `gonewild:username` or `http://gonewild.com/username`
This commit is contained in:
parent
8a22035b89
commit
68ffc7f760
@ -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());
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user