# -*- coding: utf-8 -*-
"""Bag.js 분석"""
from sooin_api import SooinSession
import re

session = SooinSession()
session.login()

resp = session.session.get('http://sooinpharm.co.kr/Common/Javascript/Bag.js?v=250228')
js = resp.text

# del 포함된 부분 찾기
lines = js.split('\n')
for i, line in enumerate(lines):
    if 'del' in line.lower() and ('kind' in line.lower() or 'bagorder' in line.lower()):
        print(f'{i}: {line.strip()[:100]}')
