Fix cable_search
This commit is contained in:
parent
1e01141f41
commit
c45c59aa62
@ -1 +1 @@
|
||||
Subproject commit 67cb5f82a995d354b5a67e18ae3486350ec9c269
|
||||
Subproject commit 107858c363e8f8e4653f3bbd322a2e9c59788d5c
|
6
run.py
6
run.py
@ -173,7 +173,6 @@ def check_server():
|
||||
tmp1["category"] = fs["Product Overview"]["Product Category"]
|
||||
if "Product Overview" in fs and "Suitable Applications" in fs["Product Overview"]:
|
||||
if len(fs["Product Overview"]["Suitable Applications"]) == 0 or not isinstance(fs["Product Overview"]["Suitable Applications"], str):
|
||||
print(cable_list[idx], fs["Product Overview"]["Suitable Applications"])
|
||||
for key, value in fs["Product Overview"].items():
|
||||
#print(key,value)
|
||||
if len(value) > 5 and isinstance(value, str):
|
||||
@ -184,7 +183,6 @@ def check_server():
|
||||
tmp1["application"] = fs["Product Overview"]["Suitable Applications"]
|
||||
elif "Product Overview" in fs and "Suitable Applications:" in fs["Product Overview"]:
|
||||
if len(fs["Product Overview"]["Suitable Applications:"]) == 0 or not isinstance(fs["Product Overview"]["Suitable Applications:"], str):
|
||||
print(cable_list[idx], fs["Product Overview"]["Suitable Applications:"])
|
||||
for key, value in fs["Product Overview"].items():
|
||||
#print(key,value)
|
||||
if len(value) > 5 and isinstance(value, str):
|
||||
@ -253,12 +251,11 @@ def check_server():
|
||||
for cabledata in results:
|
||||
|
||||
fs = cabledata["fullspecs"]
|
||||
tmp1 = {"part_number": cable_list[idx], "position": idx, "name": cable_list[idx], "brand": cabledata["brand"] }
|
||||
tmp1 = {"part_number": cabledata["partnum"], "position": cabledata["position"], "name": cabledata["partnum"], "brand": cabledata["brand"] }
|
||||
if "Product Overview" in fs and "Product Category" in fs["Product Overview"]:
|
||||
tmp1["category"] = fs["Product Overview"]["Product Category"]
|
||||
if "Product Overview" in fs and "Suitable Applications" in fs["Product Overview"]:
|
||||
if len(fs["Product Overview"]["Suitable Applications"]) == 0 or not isinstance(fs["Product Overview"]["Suitable Applications"], str):
|
||||
print(cable_list[idx], fs["Product Overview"]["Suitable Applications"])
|
||||
for key, value in fs["Product Overview"].items():
|
||||
#print(key,value)
|
||||
if len(value) > 5 and isinstance(value, str):
|
||||
@ -269,7 +266,6 @@ def check_server():
|
||||
tmp1["application"] = fs["Product Overview"]["Suitable Applications"]
|
||||
elif "Product Overview" in fs and "Suitable Applications:" in fs["Product Overview"]:
|
||||
if len(fs["Product Overview"]["Suitable Applications:"]) == 0 or not isinstance(fs["Product Overview"]["Suitable Applications:"], str):
|
||||
print(cable_list[idx], fs["Product Overview"]["Suitable Applications:"])
|
||||
for key, value in fs["Product Overview"].items():
|
||||
#print(key,value)
|
||||
if len(value) > 5 and isinstance(value, str):
|
||||
|
Loading…
x
Reference in New Issue
Block a user