search: fixed wrong doc check

This commit is contained in:
Domenico Iezzi 2017-11-05 15:43:23 +01:00
parent 11128cde27
commit 6a3926fcd6
No known key found for this signature in database
GPG Key ID: 7AC94D5DDA2FB7EE

View File

@ -312,11 +312,9 @@ class GooglePlayAPI(object):
raise LoginError('Unexpected behaviour, probably expired '
'token')
cluster = response.payload.listResponse.cluster[0]
try:
cluster.HasField('doc')
except ValueError as e:
if self.debug:
print('No result for query: %s' % query)
print(cluster.doc)
if len(cluster.doc) == 0:
print('No results for query %s' % query)
break
if cluster.doc[0].containerMetadata.nextPageUrl != "":
nextPath = cluster.doc[0].containerMetadata.nextPageUrl