fixed sanitizeURL in IG ripper (#569)

This commit is contained in:
cyian-1756 2017-06-06 13:10:16 -04:00 committed by metaprime
parent 994223dae3
commit 4f8919e8d5

View File

@ -49,7 +49,7 @@ public class InstagramRipper extends AbstractJSONRipper {
@Override @Override
public URL sanitizeURL(URL url) throws MalformedURLException { public URL sanitizeURL(URL url) throws MalformedURLException {
Pattern p = Pattern.compile("^.*instagram\\.com/([a-zA-Z0-9\\-_.]{3,}).*$"); Pattern p = Pattern.compile("^.*instagram\\.com/([a-zA-Z0-9\\-_.]+).*$");
Matcher m = p.matcher(url.toExternalForm()); Matcher m = p.matcher(url.toExternalForm());
if (m.matches()) { if (m.matches()) {
return new URL("http://instagram.com/" + m.group(1)); return new URL("http://instagram.com/" + m.group(1));