- 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 - 테스트 스크립트들
27 lines
891 B
Python
27 lines
891 B
Python
# -*- 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]}')
|