mvabdi / vsco-scraper

Easily allows for scraping a VSCO
MIT License
132 stars 25 forks source link

Scrape account which begins with a hyphen? #27

Open PetroSOC opened 2 years ago

PetroSOC commented 2 years ago

Is there a way to get images from an account which begins with a hyphen ("-username")? So far I've tried encapsulating in double-quotes, single-quotes, and also escaping the "-" character like \-username, but no joy. All attempts result in a JSON key error.

intothevoid33 commented 2 years ago

Have the same issue. Doesn't seem like any additions / changes to the string helps.

mvabdi commented 2 years ago

This is a cool edge case. Do you guys have an account I can test it with until I fix it?

intothevoid33 commented 2 years ago

Sure, thanks for looking into it.

-mik

amastis commented 2 years ago

Here is an account with a hyphen https://vsco.co/-username-/gallery

mvabdi commented 2 years ago

I'll add this in probably within the next week.

billyklubb commented 11 months ago

Hello, not sure if people are still having an issue with profiles that start with a dash, the fix is in the way you initiate the command.

you need to construct the command like this: vsco-scraper -i -- -username (note the double dashes between the command and the hyphened username)

-- (double-dash) in a shell command indicates the end of options and incapacitates further option processing for the Unix or Linux command.

Coincidentally, the same is true on the command line when you try to change into a directory that has a leading dash.

"cd -- -folder_name" will tell the preceding command to ignore any following dashes as input, failure to add the double dashes will prevent you from cd'ing into the folder then you will get an error.

I hope this helps... =)

bebunw commented 10 months ago

Hello, not sure if people are still having an issue with profiles that start with a dash, the fix is in the way you initiate the command.

you need to construct the command like this: vsco-scraper -i -- -username (note the double dashes between the command and the hyphened username)

-- (double-dash) in a shell command indicates the end of options and incapacitates further option processing for the Unix or Linux command.

Coincidentally, the same is true on the command line when you try to change into a directory that has a leading dash.

"cd -- -folder_name" will tell the preceding command to ignore any following dashes as input, failure to add the double dashes will prevent you from cd'ing into the folder then you will get an error.

I hope this helps... =)

It worked, thanks