mirror of
https://github.com/RipMeApp/ripme.git
synced 2025-08-23 22:14:06 +02:00
Fix getGID regex to support optional "www"
Also removed "www" from final video URL
This commit is contained in:
@@ -24,7 +24,6 @@ public class ErotivRipper extends AbstractHTMLRipper {
|
|||||||
|
|
||||||
boolean rippingProfile;
|
boolean rippingProfile;
|
||||||
|
|
||||||
|
|
||||||
public ErotivRipper (URL url) throws IOException {
|
public ErotivRipper (URL url) throws IOException {
|
||||||
super(url);
|
super(url);
|
||||||
}
|
}
|
||||||
@@ -41,7 +40,7 @@ public class ErotivRipper extends AbstractHTMLRipper {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getGID(URL url) throws MalformedURLException {
|
public String getGID(URL url) throws MalformedURLException {
|
||||||
Pattern p = Pattern.compile("^https?://erotiv.io/e/([0-9]*)/?$");
|
Pattern p = Pattern.compile("^https?://(?:www.)?erotiv.io/e/([0-9]*)/?$");
|
||||||
Matcher m = p.matcher(url.toExternalForm());
|
Matcher m = p.matcher(url.toExternalForm());
|
||||||
if (m.matches()) {
|
if (m.matches()) {
|
||||||
return m.group(1);
|
return m.group(1);
|
||||||
@@ -72,7 +71,7 @@ public class ErotivRipper extends AbstractHTMLRipper {
|
|||||||
Pattern p = Pattern.compile("/uploads/[0-9]*\\.mp4");
|
Pattern p = Pattern.compile("/uploads/[0-9]*\\.mp4");
|
||||||
Matcher m = p.matcher(el.attr("src"));
|
Matcher m = p.matcher(el.attr("src"));
|
||||||
if (m.matches()) {
|
if (m.matches()) {
|
||||||
results.add("https://www.erotiv.io" + el.attr("src"));
|
results.add("https://erotiv.io" + el.attr("src"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user