1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-08-11 16:34:04 +02:00

Merge pull request #1592 from felixaufreisen/issue1579

VscoRipper Fix
This commit is contained in:
cyian-1756
2020-05-22 13:50:39 +00:00
committed by GitHub

View File

@@ -24,7 +24,7 @@ public class VscoRipper extends AbstractHTMLRipper {
private static final String DOMAIN = "vsco.co", private static final String DOMAIN = "vsco.co",
HOST = "vsco"; HOST = "vsco";
public VscoRipper(URL url) throws IOException{ public VscoRipper(URL url) throws IOException{
super(url); super(url);
@@ -101,7 +101,7 @@ public class VscoRipper extends AbstractHTMLRipper {
private String getUserTkn(String username) { private String getUserTkn(String username) {
String userinfoPage = "https://vsco.co/content/Static/userinfo"; String userinfoPage = "https://vsco.co/content/Static/userinfo";
String referer = "https://vsco.co/" + username + "/images/1"; String referer = "https://vsco.co/" + username + "/gallery";
Map<String,String> cookies = new HashMap<>(); Map<String,String> cookies = new HashMap<>();
cookies.put("vs_anonymous_id", UUID.randomUUID().toString()); cookies.put("vs_anonymous_id", UUID.randomUUID().toString());
try { try {
@@ -116,7 +116,7 @@ public class VscoRipper extends AbstractHTMLRipper {
} }
private String getUserName() { private String getUserName() {
Pattern p = Pattern.compile("^https?://vsco.co/([a-zA-Z0-9-]+)/images/[0-9]+"); Pattern p = Pattern.compile("^https?://vsco.co/([a-zA-Z0-9-]+)(/gallery)?(/)?");
Matcher m = p.matcher(url.toExternalForm()); Matcher m = p.matcher(url.toExternalForm());
if (m.matches()) { if (m.matches()) {
@@ -200,7 +200,7 @@ public class VscoRipper extends AbstractHTMLRipper {
} }
//Member profile (Usernames should all be different, so this should work. //Member profile (Usernames should all be different, so this should work.
p = Pattern.compile("^https?://vsco.co/([a-zA-Z0-9-]+)/images/[0-9]+"); p = Pattern.compile("^https?://vsco.co/([a-zA-Z0-9-]+)(/gallery)?(/)?");
m = p.matcher(url.toExternalForm()); m = p.matcher(url.toExternalForm());
if (m.matches()){ if (m.matches()){