diff --git a/syncplay/utils.py b/syncplay/utils.py index 1198b08..2d76c46 100755 --- a/syncplay/utils.py +++ b/syncplay/utils.py @@ -371,14 +371,15 @@ def open_system_file_browser(path): def getListOfPublicServers(): try: - import urllib.request, urllib.parse, urllib.error, syncplay, sys, messages, json + import urllib.request, urllib.parse, urllib.error, syncplay, sys, json params = urllib.parse.urlencode({'version': syncplay.version, 'milestone': syncplay.milestone, 'release_number': syncplay.release_number, - 'language': messages.messages["CURRENT"]}) + 'language': syncplay.messages.messages["CURRENT"]}) f = urllib.request.urlopen(constants.SYNCPLAY_PUBLIC_SERVER_LIST_URL.format(params)) response = f.read() + response = response.decode('utf-8') response = response.replace("

","").replace("

","").replace("
","").replace("“","'").replace("”","'").replace(":’","'").replace("’","'").replace("′","'").replace("\n","").replace("\r","") # Fix Wordpress response = ast.literal_eval(response) - + if response: return response else: