mirror of
https://github.com/RipMeApp/ripme.git
synced 2025-08-21 05:01:30 +02:00
Fixed gonewild ripper regex
Triggered by URLs that resemble `gonewild:username` or `http://gonewild.com/username`
This commit is contained in:
@@ -34,7 +34,7 @@ public class GonewildRipper extends AbstractRipper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private Matcher getUsernameMatcher(URL url) {
|
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());
|
return p.matcher(url.toExternalForm());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -332,6 +332,12 @@ public class MainWindow implements Runnable, RipStatusHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private Thread ripAlbum(String urlString) {
|
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;
|
URL url = null;
|
||||||
try {
|
try {
|
||||||
url = new URL(urlString);
|
url = new URL(urlString);
|
||||||
|
Reference in New Issue
Block a user