Skip to content

Commit

Permalink
reduced image quality for spotify and soundcloud
Browse files Browse the repository at this point in the history
  • Loading branch information
ImanMontajabi committed Jun 17, 2024
1 parent cd6e1dd commit 3c35fc5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion RAPGOAT/soundcloud_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def extract_hq_image_url(style: str) -> str:
match = re.search(url_pattern, style)
if match:
url = match.group()
url_hq = url.replace('-t200x200.jpg', '-t500x500.jpg')
url_hq = url.replace('-t200x200.jpg', '-t50x50.jpg')
return url_hq


Expand Down
4 changes: 2 additions & 2 deletions RAPGOAT/spotify_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def albums_details(bunch: list[str]) -> None:
total_tracks = album['items'][i]['total_tracks']
release_date = album['items'][i]['release_date']
album_type = album['items'][i]['album_type']
cover = album['items'][i]['images'][0]['url']
cover = album['items'][i]['images'][2]['url']
artist_names: list['str'] = []
artist_ids: list['str'] = []
for artist in album['items'][i]['artists']:
Expand Down Expand Up @@ -227,7 +227,7 @@ def track_details(bunch: list[str]) -> None:
release_date = track['album']['release_date']
duration_ms = track['duration_ms']
popularity = track['popularity']
cover_album = track['album']['images'][0]['url']
cover_album = track['album']['images'][2]['url']
artists_names: list[str] = []
artists_ids: list[str] = []
for artist_name in track['artists']:
Expand Down

0 comments on commit 3c35fc5

Please sign in to comment.