From d81dbed0f373c47764751f76bec0c9c66a2a4482 Mon Sep 17 00:00:00 2001 From: 4pr0n Date: Sun, 20 Dec 2015 15:38:42 -0800 Subject: [PATCH] v1.2.4 - Fix instagram ripper. Closes #208 --- pom.xml | 2 +- .../ripme/ripper/rippers/InstagramRipper.java | 12 ++++++------ .../java/com/rarchives/ripme/ui/UpdateUtils.java | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index a589c300..f17b3497 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.rarchives.ripme ripme jar - 1.2.3 + 1.2.4 ripme http://rip.rarchives.com diff --git a/src/main/java/com/rarchives/ripme/ripper/rippers/InstagramRipper.java b/src/main/java/com/rarchives/ripme/ripper/rippers/InstagramRipper.java index 3de42df0..4df2b0ff 100644 --- a/src/main/java/com/rarchives/ripme/ripper/rippers/InstagramRipper.java +++ b/src/main/java/com/rarchives/ripme/ripper/rippers/InstagramRipper.java @@ -39,12 +39,12 @@ public class InstagramRipper extends AbstractJSONRipper { public boolean canRip(URL url) { return (url.getHost().endsWith("instagram.com") || url.getHost().endsWith("statigr.am") - || url.getHost().endsWith("iconosquare.com/user")); + || url.getHost().endsWith("iconosquare.com/")); } @Override public String getGID(URL url) throws MalformedURLException { - Pattern p = Pattern.compile("^https?://iconosquare.com/user/([a-zA-Z0-9\\-_.]{3,}).*$"); + Pattern p = Pattern.compile("^https?://iconosquare.com/([a-zA-Z0-9\\-_.]{3,}).*$"); Matcher m = p.matcher(url.toExternalForm()); if (m.matches()) { return m.group(1); @@ -68,17 +68,17 @@ public class InstagramRipper extends AbstractJSONRipper { p = Pattern.compile("^.*instagram\\.com/([a-zA-Z0-9\\-_.]{3,}).*$"); m = p.matcher(url.toExternalForm()); if (m.matches()) { - return new URL("http://iconosquare.com/user/" + m.group(1)); + return new URL("http://iconosquare.com/" + m.group(1)); } - p = Pattern.compile("^.*iconosquare\\.com/user/([a-zA-Z0-9\\-_.]{3,}).*$"); + p = Pattern.compile("^.*iconosquare\\.com/([a-zA-Z0-9\\-_.]{3,}).*$"); m = p.matcher(url.toExternalForm()); if (m.matches()) { - return new URL("http://iconosquare.com/user/" + m.group(1)); + return new URL("http://iconosquare.com/" + m.group(1)); } p = Pattern.compile("^.*statigr\\.am/([a-zA-Z0-9\\-_.]{3,}).*$"); m = p.matcher(url.toExternalForm()); if (m.matches()) { - return new URL("http://iconosquare.com/user/" + m.group(1)); + return new URL("http://iconosquare.com/" + m.group(1)); } throw new MalformedURLException("Expected username in URL (instagram.com/username and not " + url); } diff --git a/src/main/java/com/rarchives/ripme/ui/UpdateUtils.java b/src/main/java/com/rarchives/ripme/ui/UpdateUtils.java index 3e65e350..6c7d32c8 100644 --- a/src/main/java/com/rarchives/ripme/ui/UpdateUtils.java +++ b/src/main/java/com/rarchives/ripme/ui/UpdateUtils.java @@ -21,7 +21,7 @@ import com.rarchives.ripme.utils.Utils; public class UpdateUtils { private static final Logger logger = Logger.getLogger(UpdateUtils.class); - private static final String DEFAULT_VERSION = "1.2.3"; + private static final String DEFAULT_VERSION = "1.2.4"; private static final String updateJsonURL = "http://rarchives.com/ripme.json"; private static final String updateJarURL = "http://rarchives.com/ripme.jar"; private static final String mainFileName = "ripme.jar";