1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-08-26 07:14:38 +02:00

Fix the instagram ripper (for real this time)

This commit is contained in:
cyian-1756
2019-03-02 16:53:23 -05:00
parent 08615714ad
commit 323e44db21

View File

@@ -439,6 +439,11 @@ public class InstagramRipper extends AbstractJSONRipper {
return el.attr("href");
}
}
for(Element el : doc.select("link[rel=preload]")) {
if (el.attr("href").contains("metro")) {
return el.attr("href");
}
}
return null;
}
@@ -475,6 +480,12 @@ public class InstagramRipper extends AbstractJSONRipper {
m = jsP.matcher(sb.toString());
if (m.find()) {
return m.group(1);
} else {
jsP = Pattern.compile(",u=.([a-zA-Z0-9]+).");
m = jsP.matcher(sb.toString());
if (m.find()) {
return m.group(1);
}
}
}
@@ -484,6 +495,7 @@ public class InstagramRipper extends AbstractJSONRipper {
if (m.find()) {
return m.group(1);
}
}
LOGGER.error("Could not find query_hash on " + jsFileURL);
return null;