From e9094b9e70aed83b62e1831d5df035d869ca05c4 Mon Sep 17 00:00:00 2001 From: 4pr0n Date: Tue, 17 Jun 2014 02:00:12 -0700 Subject: [PATCH] Apparently instagram usernames can contain periods --- .../ripme/ripper/rippers/InstagramRipper.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 845eeb0f..ee65ee1a 100644 --- a/src/main/java/com/rarchives/ripme/ripper/rippers/InstagramRipper.java +++ b/src/main/java/com/rarchives/ripme/ripper/rippers/InstagramRipper.java @@ -33,7 +33,7 @@ public class InstagramRipper extends AlbumRipper { @Override public URL sanitizeURL(URL url) throws MalformedURLException { - Pattern p = Pattern.compile("^https?://instagram\\.com/p/([a-zA-Z0-9\\-_]{1,}).*$"); + Pattern p = Pattern.compile("^https?://instagram\\.com/p/([a-zA-Z0-9\\-_.]{1,}).*$"); Matcher m = p.matcher(url.toExternalForm()); if (m.matches()) { // Link to photo, not the user account @@ -44,17 +44,17 @@ public class InstagramRipper extends AlbumRipper { throw new MalformedURLException("Failed to retrieve user page from " + url); } } - p = Pattern.compile("^.*instagram\\.com/([a-zA-Z0-9\\-_]{3,}).*$"); + p = Pattern.compile("^.*instagram\\.com/([a-zA-Z0-9\\-_.]{3,}).*$"); m = p.matcher(url.toExternalForm()); if (m.matches()) { return new URL("http://iconosquare.com/" + m.group(1)); } - p = Pattern.compile("^.*iconosquare\\.com/([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/" + m.group(1)); } - p = Pattern.compile("^.*statigr\\.am/([a-zA-Z0-9\\-_]{3,}).*$"); + p = Pattern.compile("^.*statigr\\.am/([a-zA-Z0-9\\-_.]{3,}).*$"); m = p.matcher(url.toExternalForm()); if (m.matches()) { return new URL("http://iconosquare.com/" + m.group(1)); @@ -145,7 +145,7 @@ public class InstagramRipper extends AlbumRipper { @Override public String getGID(URL url) throws MalformedURLException { - Pattern p = Pattern.compile("^https?://iconosquare.com/([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);