Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vsco Profile Picture Download #5341

Closed
zone559 opened this issue Mar 17, 2024 · 5 comments
Closed

Vsco Profile Picture Download #5341

zone559 opened this issue Mar 17, 2024 · 5 comments

Comments

@zone559
Copy link

zone559 commented Mar 17, 2024

Add Feature To Download Vsco Profile Picture

example:
https://vsco.co/danfeluz/gallery

"site_profile_image_url":"i.vsco.co/5deb1b2a456fc417641d4786"

adding an m to make it im.vsco.co/5deb1b2a456fc417641d4786

Which will redirect to the image url on aws server url
https://image-aws-us-west-2.vsco.co/1748e6/26909462/5deb1b2a456fc417641d4786/vsco5deb1b2ac71ad.jpg

@6ix3
Copy link

6ix3 commented May 1, 2024

Can you elaborate on this im trying to download a vsco profile picture.

@zone559
Copy link
Author

zone559 commented May 1, 2024

Can you elaborate on this im trying to download a vsco profile picture.

here a simple python code, just enter the url for the vsco profile and it should give you a url to download or view the profile picture
getprofilepicture.zip

Made some improvement in the code and it will download the image for you.
getprofilepicture.zip

@zone559
Copy link
Author

zone559 commented May 1, 2024

Can you elaborate on this im trying to download a vsco profile picture.

Do you have telegram? I have my telegram on my profile

mikf added a commit that referenced this issue May 2, 2024
@mikf mikf closed this as completed May 2, 2024
@zone559
Copy link
Author

zone559 commented May 2, 2024

Here a better version that might work better for gallery-dl since the other code work as a standalone
this one just create a url and then you can take the url and push it through as download a single image from vsco
avatar.zip

@swaggyP36000
Copy link

swaggyP36000 commented Jun 9, 2024

I improved the python script a bit:

# Please note that, while this script has been tested manually, edits were performed with the help of ChatGPT. It is possible that any or all of this code can be written more efficiently

import requests
import sys
from urllib.parse import urlparse

def fetch_profile_image_id(url):
    headers = {
        'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3'
    }
    
    try:
        response = requests.get(url, headers=headers)
        response.raise_for_status()  # Raise an exception for 4xx or 5xx status codes
        
        profile_image_id = None
        
        # Search for profileImageId in the response text
        start_index = response.text.find('"profileImageId":"')
        if start_index != -1:
            start_index += len('"profileImageId":"')
            end_index = response.text.find('"', start_index)
            profile_image_id = response.text[start_index:end_index]
        
        return profile_image_id
        
    except requests.exceptions.RequestException as e:
        print("Error fetching data:", e)
        return None

def main():
    if len(sys.argv) != 2:
        print("Usage: python filename.py [VSCO profile URL]")
        return
    
    url = sys.argv[1]
    profile_image_id = fetch_profile_image_id(url)
    
    if profile_image_id:
        # Get the username from the VSCO URL
        parsed_url = urlparse(url)
        username = parsed_url.path.split('/')[1]
        
        # Construct the profile image URL
        profile_image_url = f"https://vsco.co/{username}/media/{profile_image_id}"
        print("Profile Image URL:", profile_image_url)
    else:
        print("Profile Image ID not found.")

if __name__ == "__main__":
    main()

The idea being, instead of manually needing to enter a URL, it can be run as "python3 script.py [VSCO page URL]". When running the gallery-dl command, that page URL is the same, so it would be fairly seamless

No idea if any of this has already happened in the commits. that's just my two cents based on running the script you sent

@tweakball
Copy link

i an using vsco.storyclone.com do download profile pic and media more comfortble for me but also this tool is perfect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants