Skip to content

Commit

Permalink
Fix urllib call
Browse files Browse the repository at this point in the history
  • Loading branch information
iRet authored and iRet committed Mar 12, 2021
1 parent 7aa4c38 commit b636c16
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spotify_ripper/tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import os
import sys
import base64
import urllib
import urllib.request


def set_metadata_tags(args, audio_file, idx, track, ripper):
Expand Down Expand Up @@ -69,7 +69,7 @@ def set_metadata_tags(args, audio_file, idx, track, ripper):
def get_cover_image(image_link):
image_link = 'https://i.scdn.co%s' % (
image_link[len('spotify'):].replace(':', '/'))
cover_file = urllib.urlretrieve(image_link)[0]
cover_file = urllib.request.urlretrieve(image_link)[0]

with open(cover_file, "rb") as f:
if f.mode == "rb":
Expand Down

0 comments on commit b636c16

Please sign in to comment.