Skip to content

Commit

Permalink
Converted to Python 3
Browse files Browse the repository at this point in the history
  • Loading branch information
Blue9 committed May 12, 2017
1 parent bc5dbf8 commit cf4d98f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions audiojack.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/usr/bin/env python
from __future__ import unicode_literals

import imghdr
import os
import re
import socket
import subprocess
import sys
import urllib2
from urlparse import urlparse
import urllib.request, urllib.error, urllib.parse
from urllib.parse import urlparse

import musicbrainzngs
import youtube_dl
Expand Down Expand Up @@ -63,7 +63,7 @@ def select(self, entry, path=None):
if scheme[:4] != 'http':
# Absolute path to file URI
img_path = 'file:///%s' % img_path
img_request = urllib2.urlopen(img_path)
img_request = urllib.request.urlopen(img_path)
img = img_request.read()
img_request.close()
valid_exts = ['jpeg', 'png', 'gif', 'bmp']
Expand Down Expand Up @@ -230,4 +230,4 @@ def _get_cover_art(self, album_id):
download = aj.select(results[0])
else:
download = aj.select({'url': url})
print 'Downloaded %s' % download
print('Downloaded %s' % download)

0 comments on commit cf4d98f

Please sign in to comment.