방금 "내 주소록"이라는 단어가 내 Google 주소록 목록에있는 모든 그룹을 가져 오는 작은 파이썬 스크립트를 작성했습니다. 3.0 API를 사용 중이며 2.0 API에도 비슷한 문제가있었습니다. 다음은 Google 2.0 Contacts documentation에서 가져온 것입니다."내 주소록"그룹 Google 주소록
예를 들어 내 연락처 그룹의 ID를 확인하려면 특정 사용자에 대한 모든 그룹 피드를 검색 한 다음 하위 요소가있는 그룹 항목을 찾아 해당 그룹 항목의 요소 값을 가져올 수 있습니다 .
현재 응답은 어디서나 gContact : systemGroup 태그가 없습니다. 특정 그룹의 그룹 ID를 얻으려면 어떻게해야합니까? 아래 그림과 같이
내 스크립트입니다 : -
user="[email protected]"
pas="blah"
data={"Email":user, "Passwd":pas, "service": "cp", "source":"tester"}
import urllib
data = urllib.urlencode(data)
import urllib2
req = urllib2.Request('https://www.google.com/accounts/ClientLogin', data)
resp = urllib2.urlopen(req)
x = resp.read()
auth=a[-1].split('=')[-1]
req = urllib2.Request('https://www.google.com/m8/feeds/groups/[email protected]/full/', headers={'Authorization':'GoogleLogin auth='+auth})
resp = urllib2.urlopen(req)
x = resp.read()
print x
print "My Contacts" in x
print "gContact:systemGroup" in x
나는이 좋지 않을까 해결 수있는 방법에 대한 몇 가지 단서, 감사합니다.
이 경우 https://www.google.com/m8/feeds/groups/default/full이 도움이 될 수 있습니다. –