Skip to content

Commit e32cad2

Browse files
committed
add Google category in examples
1 parent 9a521f7 commit e32cad2

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ print(ean, " is ", name)
1818

1919
# more detailed result, preferrably in English (1)
2020
product = eansearch.barcodeSearch(ean, 1)
21-
print(ean, " is ", product["name"].encode("utf-8"), " from category ", product["categoryName"], " issued in ", product["issuingCountry"])
21+
print(ean, " is ", product["name"].encode("utf-8"), " from category ", product["categoryName"], "(Google ID", product["googleCategoryId"], ") issued in", product["issuingCountry"])
2222

2323
isbn = "1119578884"
2424
title = eansearch.isbnLookup(isbn)

test.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,11 @@
1414
eansearch = EANSearch(apiToken)
1515

1616
name = eansearch.barcodeLookup(ean)
17-
print(ean, " is ", name)
17+
print(ean + " is " + name)
1818

1919
# more detailed result, preferably in English (1)
2020
product = eansearch.barcodeSearch(ean, 1)
21-
print(ean, " is ", product["name"].encode("utf-8"), " from category ", product["categoryName"], " issued in ", product["issuingCountry"])
22-
exit(0)
21+
print(ean, "is", product["name"].encode("utf-8"), "from category", product["categoryName"], "(Google ID", product["googleCategoryId"], ") issued in", product["issuingCountry"])
2322

2423
isbn = "1119578884"
2524
title = eansearch.isbnLookup(isbn)

0 commit comments

Comments
 (0)