fixed sanitizeURL in IG ripper (#569)
This commit is contained in:
parent
994223dae3
commit
4f8919e8d5
@ -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));
|
||||||
|
Loading…
Reference in New Issue
Block a user