From 595d8c13f58808f4dd6b01d2c8aa26975d4b3a69 Mon Sep 17 00:00:00 2001 From: 4pr0n Date: Wed, 9 Apr 2014 19:37:58 -0700 Subject: [PATCH] 1.0.14 - Fix twitter rips containing underscores #7 --- pom.xml | 2 +- .../com/rarchives/ripme/ripper/rippers/TwitterRipper.java | 4 ++-- src/main/java/com/rarchives/ripme/ui/UpdateUtils.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index d1588f3f..2eacf655 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.rarchives.ripme ripme jar - 1.0.13 + 1.0.14 ripme http://rip.rarchives.com diff --git a/src/main/java/com/rarchives/ripme/ripper/rippers/TwitterRipper.java b/src/main/java/com/rarchives/ripme/ripper/rippers/TwitterRipper.java index b92a3b59..810734cb 100644 --- a/src/main/java/com/rarchives/ripme/ripper/rippers/TwitterRipper.java +++ b/src/main/java/com/rarchives/ripme/ripper/rippers/TwitterRipper.java @@ -55,14 +55,14 @@ public class TwitterRipper extends AbstractRipper { @Override public URL sanitizeURL(URL url) throws MalformedURLException { // https://twitter.com/search?q=from%3Apurrbunny%20filter%3Aimages&src=typd - Pattern p = Pattern.compile("^https?://(m\\.)?twitter\\.com/search\\?q=([a-zA-Z0-9%]{1,}).*$"); + Pattern p = Pattern.compile("^https?://(m\\.)?twitter\\.com/search\\?q=([a-zA-Z0-9%\\-_]{1,}).*$"); Matcher m = p.matcher(url.toExternalForm()); if (m.matches()) { albumType = ALBUM_TYPE.SEARCH; searchText = m.group(2); return url; } - p = Pattern.compile("^https?://(m\\.)?twitter\\.com/([a-zA-Z0-9]{1,}).*$"); + p = Pattern.compile("^https?://(m\\.)?twitter\\.com/([a-zA-Z0-9\\-_]{1,}).*$"); m = p.matcher(url.toExternalForm()); if (m.matches()) { albumType = ALBUM_TYPE.ACCOUNT; diff --git a/src/main/java/com/rarchives/ripme/ui/UpdateUtils.java b/src/main/java/com/rarchives/ripme/ui/UpdateUtils.java index e5bbb73c..5569106c 100644 --- a/src/main/java/com/rarchives/ripme/ui/UpdateUtils.java +++ b/src/main/java/com/rarchives/ripme/ui/UpdateUtils.java @@ -19,7 +19,7 @@ import org.jsoup.nodes.Document; public class UpdateUtils { private static final Logger logger = Logger.getLogger(UpdateUtils.class); - private static final String DEFAULT_VERSION = "1.0.13"; + private static final String DEFAULT_VERSION = "1.0.14"; 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";