1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-08-06 13:56:34 +02:00

Fixed the LusciousRipper. It now redirects all rips to the old site and supports ripping from the new (old, legacy) subdomains

This commit is contained in:
cyian-1756
2019-11-30 19:54:46 -05:00
parent af7321d139
commit 7869a333cc

View File

@@ -19,13 +19,22 @@ import com.rarchives.ripme.utils.Http;
public class LusciousRipper extends AbstractHTMLRipper {
private static final int RETRY_COUNT = 5; // Keeping it high for read timeout exception.
private Pattern p = Pattern.compile("^https?://(?:members.)?luscious\\.net/albums/([-_.0-9a-zA-Z]+).*$");
private Pattern p = Pattern.compile("^https?://(?:www\\.)?(?:members\\.||legacy\\.||old\\.)?luscious\\.net/albums/([-_.0-9a-zA-Z]+).*$");
private DownloadThreadPool lusciousThreadPool = new DownloadThreadPool("lusciousThreadPool");
public LusciousRipper(URL url) throws IOException {
super(url);
}
@Override
public URL sanitizeURL(URL url) throws MalformedURLException {
String URLToReturn = url.toExternalForm();
URLToReturn = URLToReturn.replaceAll("https?://(?:www\\.)?luscious\\.", "https://old.luscious.");
URL san_url = new URL(URLToReturn);
LOGGER.info("sanitized URL is " + san_url.toExternalForm());
return san_url;
}
@Override
public String getDomain() {
return "luscious.net";