mirror of
https://github.com/GAM-team/GAM.git
synced 2026-07-04 21:01:36 +00:00
convert to string before urldecode
This commit is contained in:
5
gam.py
5
gam.py
@@ -1508,7 +1508,7 @@ def doPhoto(users):
|
|||||||
import urllib2
|
import urllib2
|
||||||
try:
|
try:
|
||||||
f = urllib2.urlopen(filename)
|
f = urllib2.urlopen(filename)
|
||||||
image_data = f.read()
|
image_data = str(f.read())
|
||||||
except urllib2.HTTPError, e:
|
except urllib2.HTTPError, e:
|
||||||
print e
|
print e
|
||||||
continue
|
continue
|
||||||
@@ -1542,7 +1542,8 @@ def getPhoto(users):
|
|||||||
print u' no photo for %s' % user
|
print u' no photo for %s' % user
|
||||||
continue
|
continue
|
||||||
try:
|
try:
|
||||||
photo_data = photo[u'photoData']
|
photo_data = str(photo[u'photoData'])
|
||||||
|
print photo_data
|
||||||
photo_data = base64.urlsafe_b64decode(photo_data)
|
photo_data = base64.urlsafe_b64decode(photo_data)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
print u' no photo for %s' % user
|
print u' no photo for %s' % user
|
||||||
|
|||||||
Reference in New Issue
Block a user