Skip to content

Commit

Permalink
Merge pull request #4 from michabirklbauer/develop
Browse files Browse the repository at this point in the history
change media names to ids
  • Loading branch information
michabirklbauer authored Dec 30, 2022
2 parents 54dd613 + a72070c commit 7880f12
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions vsco_downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# https://github.com/michabirklbauer/
# [email protected]

version = "1.0.1"
version = "1.0.2"
date = "20221230"

import urllib.request as ur
Expand Down Expand Up @@ -41,12 +41,12 @@ def download(vsco_media_url, get_video_thumbnails = True):
info = medias[media]["media"]
if not bool(info["isVideo"]) or get_video_thumbnails:
media_url = "https://" + str(info["responsiveUrl"].encode().decode("unicode-escape"))
media_name = media_url.split("/")[-1]
media_name = str(media) + ".jpg"
ur.urlretrieve(media_url, media_name)
media_urls.append(media_url)
if bool(info["isVideo"]):
media_url = "https://" + str(info["videoUrl"].encode().decode("unicode-escape"))
media_name = media_url.split("/")[-1]
media_name = str(media) + ".mp4"
ur.urlretrieve(media_url, media_name)
media_urls.append(media_url)
except Exception as e:
Expand Down

0 comments on commit 7880f12

Please sign in to comment.