25 lines
818 B
Python
25 lines
818 B
Python
# -*- coding: utf-8 -*-
|
|
import requests
|
|
|
|
# 스틸녹스 검색해서 spec 필드 확인
|
|
res = requests.get('http://localhost:7001/api/geoyoung/stock?keyword=스틸녹스', timeout=30)
|
|
data = res.json()
|
|
|
|
print("=== 지오영 제품 검색 결과 ===")
|
|
for item in data.get('items', [])[:3]:
|
|
print(f" product_name: {item.get('product_name')}")
|
|
print(f" specification: {item.get('specification')}")
|
|
print(f" stock: {item.get('stock')}")
|
|
print()
|
|
|
|
# 수인도 확인
|
|
res2 = requests.get('http://localhost:7001/api/sooin/stock?keyword=스틸녹스', timeout=30)
|
|
data2 = res2.json()
|
|
|
|
print("=== 수인 제품 검색 결과 ===")
|
|
for item in data2.get('items', [])[:3]:
|
|
print(f" name: {item.get('name')}")
|
|
print(f" spec: {item.get('spec')}")
|
|
print(f" stock: {item.get('stock')}")
|
|
print()
|