Merge pull request #91 from ppoffice/master

Fix protobuf generation and test file
This commit is contained in:
Domenico Iezzi 2019-06-19 11:37:05 +02:00 committed by GitHub
commit 65c92c96f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -20,7 +20,7 @@ class ProtobufBuilder(_build):
subprocess.run([PROTOC_BIN,
"--proto_path=" + CURRENT_DIR,
"--python_out=" + CURRENT_DIR + "/gpapi/",
"googleplay.proto"])
CURRENT_DIR + "/googleplay.proto"])
super().run()
setup(name='gpapi',

View File

@ -18,7 +18,8 @@ print(server.searchSuggest("fir"))
result = server.search("firefox")
for doc in result:
print("doc: {}".format(doc["docid"]))
if 'docid' in doc:
print("doc: {}".format(doc["docid"]))
for cluster in doc["child"]:
print("\tcluster: {}".format(cluster["docid"]))
for app in cluster["child"]:
@ -80,7 +81,8 @@ print("\nBrowsing the {} category\n".format(sampleCat))
browseCat = server.home(cat=sampleCat)
for doc in browseCat:
print("doc: {}".format(doc["docid"]))
if 'docid' in doc:
print("doc: {}".format(doc["docid"]))
for child in doc["child"]:
print("\tsubcat: {}".format(child["docid"]))
for app in child["child"]: