# Get IP
def _getIP(self):
try:
- myip = urllib2.urlopen('http://whatismyip.org').read()
+ myip = urllib2.urlopen('http://ipecho.net/plain').read()
if re.match("^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$", myip):
if self._debugging:
print "IP is " + myip
while (i < len(playlists)):
s = playlists[i]
- list.append([str(s['PlaylistName']).encode('ascii', 'ignore'), s['PlaylistID']])
+ list.append([unicode(s['PlaylistName']).encode('utf8', 'ignore'), s['PlaylistID']])
i = i + 1
return list