New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
imagefap not saving titles #1093
Comments
This is because ImageFap changed their titles to their pages, which breaks the pattern matching used in ImagefapRipper.java I was able to do the following: diff --git a/src/main/java/com/rarchives/ripme/ripper/rippers/ImagefapRipper.java b/src/main/java/com/rarchives/ripme/ripper/rippers/ImagefapRipper.java
index 07a6e529..700904bb 100644
--- a/src/main/java/com/rarchives/ripme/ripper/rippers/ImagefapRipper.java
+++ b/src/main/java/com/rarchives/ripme/ripper/rippers/ImagefapRipper.java
@@ -145,7 +145,7 @@ public class ImagefapRipper extends AbstractHTMLRipper {
try {
// Attempt to use album title as GID
String title = getFirstPage().title();
- Pattern p = Pattern.compile("^Porn pics of (.*) \\(Page 1\\)$");
+ Pattern p = Pattern.compile("(.*) Porn Pics \\& Porn GIFs$");
Matcher m = p.matcher(title);
if (m.matches()) {
return getHost() + "_" + m.group(1) + "_" + getGID(url); When I attempted to download a new album, it would show the proper title within the folder name, but for some reason it would then always say I had already downloaded the album I was attempting to download (I hadn't). I'm not good enough with Java to debug it further, so hopefully someone else with more knowledge can chime in and provide a proper fix. |
After digging into this more and comparing this ripper with other sites' rippers, I was able to fix it by changing things up with the below patch: diff --git a/src/main/java/com/rarchives/ripme/ripper/rippers/ImagefapRipper.java b/src/main/java/com/rarchives/ripme/ripper/rippers/ImagefapRipper.java
index 07a6e529..ae02b5ca 100644
--- a/src/main/java/com/rarchives/ripme/ripper/rippers/ImagefapRipper.java
+++ b/src/main/java/com/rarchives/ripme/ripper/rippers/ImagefapRipper.java
@@ -145,11 +145,9 @@ public class ImagefapRipper extends AbstractHTMLRipper {
try {
// Attempt to use album title as GID
String title = getFirstPage().title();
- Pattern p = Pattern.compile("^Porn pics of (.*) \\(Page 1\\)$");
- Matcher m = p.matcher(title);
- if (m.matches()) {
- return getHost() + "_" + m.group(1) + "_" + getGID(url);
- }
+ title = title.replace("Porn Pics & Porn GIFs", "");
+ title = title.replace(" ", "_");
+ return getHost() + "_" + title + "_" + getGID(url);
} catch (IOException e) {
// Fall back to default album naming convention
} |
Facing this issue as well. Has it been fixed? |
@fernandezh1983 The PR has been merged and the fix will be in the next update |
Expected Behavior imagefap_Red.Heels.Lover.In.Love_7789753
Detail the expected behavior here.
Actual Behavior imagefap_7789753
Detail the actual (incorrect) behavior here. You can post log snippets or attach log files to your issue report.
The text was updated successfully, but these errors were encountered: