我们想从谷歌 API 导入联系人照片。
以下代码对我有用。
for email, name, entry in feed:
photo = client.GetPhoto(entry)
if photo:
fname = str(uuid.uuid4()) + '.jpg'
image_file = open(dname + '/' + fname, 'wb')
image_file.write(photo)
image_file.close()
result[email] = '/media/import/%s/%s' % (dir, fname)
现在,由于某些原因,我们获得了文件 atom 提要副本。所以方法GetPhoto
不起作用。
有什么想法,为什么会发生,目前检索联系人照片的方法是什么?