# -*- 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

# chk, checkbox 관련 코드 찾기
lines = js.split('\n')
for i, line in enumerate(lines):
    if 'chk' in line.lower() or 'check' in line.lower():
        print(f'{i}: {line.strip()[:120]}')
