[英]Returns Nothing [] from Google + API using Python
大家好,我希望所有人都过得很好,我尝试使用Python使用GOOGLE + API来获取Json格式数据。 您可以从下面查看代码
from apiclient import discovery
API_KEY = '######'
GPLUS = discovery.build('plus', 'v1', developerKey=API_KEY)
#here i used V1 while using v2,v3,v4 i got the follwing errors
items =
GPLUS.activities().search(query='python').execute().get('items', [])
print(items)
#returns nothing
for data in items:
post = ' '.join(data['title'].strip().split())
if post:
print(TMPL % (data['actor']['displayName'],
data['published'], post))
#same problem executes nothing
回应
v2,v3,v4
HttpError: <HttpError 500 when requesting
https://plus.googleapis.com/$discovery/rest?version=v4&key=AIzaSyCgPkdet3KVbJ_Tzd5VgtYeFwWCQwpUVcE returned "Internal Server Error">
旧版Google+ API已于2019年3月7日关闭。
Google plus于2019年4月在Google+ API也被关闭的同一时间或不久被关闭。
该API不再起作用,这就是为什么您会收到500错误的原因。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.