Fix imports for python3

This commit is contained in:
Ritiek
2017-06-16 18:04:08 +05:30
parent 4547ef7e71
commit 5fcdc3c227
5 changed files with 9 additions and 2 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,8 +1,11 @@
import urllib2
from mutagen.easyid3 import EasyID3
from mutagen.id3 import ID3, APIC
from mutagen.mp4 import MP4, MP4Cover
try:
import urllib2
except ImportError:
import urllib.request as urllib2
def compare(file, metadata):
try:

View File

@@ -8,12 +8,16 @@ from titlecase import titlecase
from slugify import slugify
import spotipy
import spotipy.oauth2 as oauth2
import urllib2
import pafy
import sys
import os
import subprocess
try:
import urllib2
except ImportError:
import urllib.request as urllib2
def generate_songname(raw_song):
if misc.is_spotify(raw_song):
tags = generate_metadata(raw_song)