v1.2.4 - Fix instagram ripper. Closes #208

This commit is contained in:
4pr0n 2015-12-20 15:38:42 -08:00
parent ab323056aa
commit d81dbed0f3
3 changed files with 8 additions and 8 deletions

View File

@ -4,7 +4,7 @@
<groupId>com.rarchives.ripme</groupId>
<artifactId>ripme</artifactId>
<packaging>jar</packaging>
<version>1.2.3</version>
<version>1.2.4</version>
<name>ripme</name>
<url>http://rip.rarchives.com</url>
<properties>

View File

@ -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);
}

View File

@ -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";