feat: 도매상 API 통합 및 스키마 업데이트
- wholesale 패키지 연동 (SooinSession, GeoYoungSession) - Flask Blueprint 분리 (sooin_api.py, geoyoung_api.py) - order_context 스키마 확장 (wholesaler_id, internal_code 등) - 수인약품 개별 취소 기능 (cancel_item, restore_item) - 문서 추가: WHOLESALE_API_INTEGRATION.md - 테스트 스크립트들
This commit is contained in:
26
backend/test_del2.py
Normal file
26
backend/test_del2.py
Normal file
@@ -0,0 +1,26 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from sooin_api import SooinSession
|
||||
import re
|
||||
|
||||
session = SooinSession()
|
||||
session.login()
|
||||
|
||||
resp = session.session.get('http://sooinpharm.co.kr/Service/Order/Bag.asp?currVenCd=50911')
|
||||
html = resp.text
|
||||
|
||||
# 모든 script 내용 출력
|
||||
scripts = re.findall(r'<script[^>]*>(.*?)</script>', html, re.DOTALL)
|
||||
|
||||
for i, script in enumerate(scripts):
|
||||
# 삭제/취소 관련 있으면 출력
|
||||
if any(x in script.lower() for x in ['del', 'cancel', 'remove', 'chk_']):
|
||||
print(f'=== Script {i+1} ===')
|
||||
# 함수 시그니처만 추출
|
||||
funcs = re.findall(r'function\s+\w+[^{]+', script)
|
||||
for f in funcs[:5]:
|
||||
print(f' {f.strip()}')
|
||||
|
||||
# 특정 패턴 찾기
|
||||
patterns = re.findall(r'(delPhysic|cancelOrder|chkBag|selectDel)[^(]*\([^)]*\)', script)
|
||||
if patterns:
|
||||
print(f' Patterns: {patterns[:5]}')
|
||||
Reference in New Issue
Block a user