Sparta Coding Club/Today I Learned [TIL]

[TIL] #DAY - 055 - (2) 무신사 크롤링? 스크랩핑!(카테고리 정보)

양한마리 2022. 11. 22. 08:55
728x90



무신사 크롤링? 스크래핑! 2탄

지난시간에 이어서 무신사에서 지정하고있는 카테고리 정보를 출력해보려고한다

카테고리 정보를 가져와서 뭐할까? 라는 생각도 들겠지만 사이트 구조를 자세히 들여다보면 이유를 알수있다.

 




[문제 요약]

1. 무신사 실시간 랭킹을 1~90위까지 출력해보자

 

[TIL] #DAY - 054 - (1) 무신사 크롤링? 스크랩핑!(실시간 랭킹)

무신사 크롤링? 스크래핑! BeautifulSoup 을 이용하여 무신사 랭킹을 출력해보자! [문제 요약] 1. 무신사 실시간 랭킹을 1~90위까지 출력해보자 # 순위 : (1) ((2)) # 상품번호 : (3) # 브랜드명 : (4) # 상품명

hanmari-code.tistory.com

 

2. 카테고리 정보 출력해보자

- 필요 이유는 아래 링크는 실시간 상품 랭킹인데 빨강 하이라이트 부분을 보면 mainCategory, subCategoryr가 있는걸 알수있다.
 해당 내용에 내가 현재 구하려고하는 카테고리 정보를 넘겨주면 해당 카테고리 값에대한 랭킹 정보를 가져올수있게된다.

"https://www.musinsa.com/ranking/best?period=now&age=ALL&mainCategory=&subCategory=&leafCategory=&price=&golf=false&kids=false&newProduct=false&exclusive=false&discount=false&soldOut=false&page={page}&viewType=small&priceMin=&priceMax="

- 다만 여기서 문제가 발생한다.
 1번의 실시간 랭킹 출력하듯이 출력해보니 내용은 안나오고 script만 출력된다.
 그래서 방법을 찾을수없어 크롬에서 출력된 내용을 복사하여 html 파일을 만들어서 해당 html로 출력해보았다.

<div id="leftCommonPc"></div>
        <script src="//static.msscdn.net/static/common/1.2.0/lnb.js?202211211519"></script>

 

[풀이 요약]

- HTML, BeautifulSoup 를 이용하여 html 내용 출력하기

[코드]

1. nav_left_menu.html

<div fragment="ff8d7ed1ef" class="left_area">
    <div class="tabBox box_menu_left">
        <ul class="snb snb-3">
            <li data-for="category" class="box-tab-btn tab-btn btn tab-box-category active" style="width: 50%;"> 품목
            </li>
            <li data-for="brandselect" class="box-tab-btn tab-btn btn tab-box-brand" style="width: 50%;"> 브랜드 </li>
        </ul>
        <div id="accordion2" class="tab category active ui-accordion ui-widget ui-helper-reset" role="tablist">
            <nav class="nav_menu">
                <div role="tablist" class="nav_category item_menu_btn">
                    <div class="nav_menu_title ui-accordion-header ui-state-default ui-accordion-icons ui-corner-all"
                        role="tab" id="ui-id-1" aria-controls="ui-id-2" aria-selected="false" aria-expanded="false"
                        tabindex="0"><span
                            class="ui-accordion-header-icon ui-icon ui-icon-triangle-1-e"></span><a><strong
                                class="title">인기</strong><span class="nav_kr">Best</span></a></div>
                    <div class="item_sub_menu ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom"
                        id="ui-id-2" aria-labelledby="ui-id-1" role="tabpanel" aria-hidden="true"
                        style="display: none;">
                        <ul class="nav_category_menu">
                            <li><a href="https://www.musinsa.com/categories/item/003002"> 데님 팬츠 <span>
                                        (12,244)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/007001"> 캡/야구 모자 <span>
                                        (15,840)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/008001"> 양말 <span> (7,015)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/018002"> 캔버스/단화 <span>
                                        (5,351)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/002025"> 무스탕/퍼 <span>
                                        (1,342)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/003004"> 트레이닝/조거 팬츠 <span>
                                        (19,674)</span></a></li>
                        </ul>
                        <ul class="nav_category_menu">
                            <li><a href="https://www.musinsa.com/categories/item/001005"> 맨투맨/스웨트셔츠 <span>
                                        (35,321)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/001004"> 후드 티셔츠 <span>
                                        (21,428)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/001006"> 니트/스웨터 <span>
                                        (19,967)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/002023"> 플리스/뽀글이 <span>
                                        (3,888)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/002012"> 숏패딩/숏헤비 아우터 <span>
                                        (8,737)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/002016"> 패딩 베스트 <span>
                                        (1,477)</span></a></li>
                        </ul>
                    </div>
                </div>
                <div role="tablist" class="nav_category item_menu_btn">
                    <div class="nav_menu_title ui-accordion-header ui-state-default ui-corner-all ui-accordion-icons"
                        role="tab" id="ui-id-3" aria-controls="ui-id-4" aria-selected="false" aria-expanded="false"
                        tabindex="-1"><span
                            class="ui-accordion-header-icon ui-icon ui-icon-triangle-1-e"></span><a><strong
                                class="title">상의</strong><span class="nav_kr">Top</span></a></div>
                    <div class="item_sub_menu ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom"
                        id="ui-id-4" aria-labelledby="ui-id-3" role="tabpanel" aria-hidden="true"
                        style="display: none;">
                        <div class="item_sub_menu_all"><a href="https://www.musinsa.com/categories/item/001"> 전체 <span>
                                    (177,810)</span></a></div>
                        <ul class="nav_category_menu">
                            <li><a href="https://www.musinsa.com/categories/item/001001"> 반소매 티셔츠 <span>
                                        (52,997)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/001010"> 긴소매 티셔츠 <span>
                                        (15,061)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/001011"> 민소매 티셔츠 <span>
                                        (3,960)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/001002"> 셔츠/블라우스 <span>
                                        (21,099)</span></a></li>
                        </ul>
                        <ul class="nav_category_menu">
                            <li><a href="https://www.musinsa.com/categories/item/001003"> 피케/카라 티셔츠 <span>
                                        (4,355)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/001005"> 맨투맨/스웨트셔츠 <span>
                                        (35,321)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/001004"> 후드 티셔츠 <span>
                                        (21,428)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/001006"> 니트/스웨터 <span>
                                        (19,967)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/001008"> 기타 상의 <span>
                                        (3,619)</span></a></li>
                        </ul>
                    </div>
                </div>
                <div role="tablist" class="nav_category item_menu_btn">
                    <div class="nav_menu_title ui-accordion-header ui-state-default ui-corner-all ui-accordion-icons"
                        role="tab" id="ui-id-5" aria-controls="ui-id-6" aria-selected="false" aria-expanded="false"
                        tabindex="-1"><span
                            class="ui-accordion-header-icon ui-icon ui-icon-triangle-1-e"></span><a><strong
                                class="title">아우터</strong><span class="nav_kr">Outer</span></a></div>
                    <div class="item_sub_menu ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom"
                        id="ui-id-6" aria-labelledby="ui-id-5" role="tabpanel" aria-hidden="true"
                        style="display: none;">
                        <div class="item_sub_menu_all"><a href="https://www.musinsa.com/categories/item/002"> 전체 <span>
                                    (72,824)</span></a></div>
                        <ul class="nav_category_menu">
                            <li><a href="https://www.musinsa.com/categories/item/002022"> 후드 집업 <span>
                                        (4,545)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/002001"> 블루종/MA-1 <span>
                                        (2,872)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/002002"> 레더/라이더스 재킷 <span>
                                        (2,135)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/002025"> 무스탕/퍼 <span>
                                        (1,342)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/002017"> 트러커 재킷 <span>
                                        (2,450)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/002003"> 슈트/블레이저 재킷 <span>
                                        (6,029)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/002020"> 카디건 <span> (9,490)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/002019"> 아노락 재킷 <span>
                                        (1,795)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/002023"> 플리스/뽀글이 <span>
                                        (3,888)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/002018"> 트레이닝 재킷 <span>
                                        (1,541)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/002004"> 스타디움 재킷 <span>
                                        (1,031)</span></a></li>
                        </ul>
                        <ul class="nav_category_menu">
                            <li><a href="https://www.musinsa.com/categories/item/002008"> 환절기 코트 <span>
                                        (1,864)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/002007"> 겨울 싱글 코트 <span>
                                        (2,301)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/002024"> 겨울 더블 코트 <span>
                                        (1,196)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/002009"> 겨울 기타 코트 <span>
                                        (1,334)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/002013"> 롱패딩/롱헤비 아우터 <span>
                                        (1,213)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/002012"> 숏패딩/숏헤비 아우터 <span>
                                        (8,737)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/002016"> 패딩 베스트 <span>
                                        (1,477)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/002021"> 베스트 <span> (4,732)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/002014"> 사파리/헌팅 재킷 <span>
                                        (1,273)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/002006"> 나일론/코치 재킷 <span>
                                        (5,038)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/002015"> 기타 아우터 <span>
                                        (6,538)</span></a></li>
                        </ul>
                    </div>
                </div>
                <div role="tablist" class="nav_category item_menu_btn">
                    <div class="nav_menu_title ui-accordion-header ui-state-default ui-corner-all ui-accordion-icons"
                        role="tab" id="ui-id-7" aria-controls="ui-id-8" aria-selected="false" aria-expanded="false"
                        tabindex="-1"><span
                            class="ui-accordion-header-icon ui-icon ui-icon-triangle-1-e"></span><a><strong
                                class="title">바지</strong><span class="nav_kr">Pants</span></a></div>
                    <div class="item_sub_menu ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom"
                        id="ui-id-8" aria-labelledby="ui-id-7" role="tabpanel" aria-hidden="true"
                        style="display: none;">
                        <div class="item_sub_menu_all"><a href="https://www.musinsa.com/categories/item/003"> 전체 <span>
                                    (69,517)</span></a></div>
                        <ul class="nav_category_menu">
                            <li><a href="https://www.musinsa.com/categories/item/003002"> 데님 팬츠 <span>
                                        (12,244)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/003007"> 코튼 팬츠 <span>
                                        (9,635)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/003008"> 슈트 팬츠/슬랙스 <span>
                                        (7,911)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/003004"> 트레이닝/조거 팬츠 <span>
                                        (19,674)</span></a></li>
                        </ul>
                        <ul class="nav_category_menu">
                            <li><a href="https://www.musinsa.com/categories/item/003009"> 숏 팬츠 <span>
                                        (12,296)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/003005"> 레깅스 <span> (2,547)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/003010"> 점프 슈트/오버올 <span>
                                        (842)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/003006"> 기타 바지 <span>
                                        (4,368)</span></a></li>
                        </ul>
                    </div>
                </div>
                <div role="tablist" class="nav_category item_menu_btn">
                    <div class="nav_menu_title ui-accordion-header ui-state-default ui-corner-all ui-accordion-icons"
                        role="tab" id="ui-id-9" aria-controls="ui-id-10" aria-selected="false" aria-expanded="false"
                        tabindex="-1"><span
                            class="ui-accordion-header-icon ui-icon ui-icon-triangle-1-e"></span><a><strong
                                class="title">원피스</strong><span class="nav_kr">Onepiece</span></a></div>
                    <div class="item_sub_menu ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom"
                        id="ui-id-10" aria-labelledby="ui-id-9" role="tabpanel" aria-hidden="true"
                        style="display: none;">
                        <div class="item_sub_menu_all"><a href="https://www.musinsa.com/categories/item/020"> 전체 <span>
                                    (11,205)</span></a></div>
                        <ul class="nav_category_menu">
                            <li><a href="https://www.musinsa.com/categories/item/020006"> 미니 원피스 <span>
                                        (2,887)</span></a></li>
                        </ul>
                        <ul class="nav_category_menu">
                            <li><a href="https://www.musinsa.com/categories/item/020007"> 미디 원피스 <span>
                                        (4,306)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/020008"> 맥시 원피스 <span>
                                        (4,012)</span></a></li>
                        </ul>
                    </div>
                </div>
                <div role="tablist" class="nav_category item_menu_btn">
                    <div class="nav_menu_title ui-accordion-header ui-state-default ui-corner-all ui-accordion-icons"
                        role="tab" id="ui-id-11" aria-controls="ui-id-12" aria-selected="false" aria-expanded="false"
                        tabindex="-1"><span
                            class="ui-accordion-header-icon ui-icon ui-icon-triangle-1-e"></span><a><strong
                                class="title">스커트</strong><span class="nav_kr">Skirt</span></a></div>
                    <div class="item_sub_menu ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom"
                        id="ui-id-12" aria-labelledby="ui-id-11" role="tabpanel" aria-hidden="true"
                        style="display: none;">
                        <div class="item_sub_menu_all"><a href="https://www.musinsa.com/categories/item/022"> 전체 <span>
                                    (10,436)</span></a></div>
                        <ul class="nav_category_menu">
                            <li><a href="https://www.musinsa.com/categories/item/022001"> 미니스커트 <span>
                                        (5,053)</span></a></li>
                        </ul>
                        <ul class="nav_category_menu">
                            <li><a href="https://www.musinsa.com/categories/item/022002"> 미디스커트 <span>
                                        (2,785)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/022003"> 롱스커트 <span> (2,598)</span></a>
                            </li>
                        </ul>
                    </div>
                </div>
                <div role="tablist" class="nav_category item_menu_btn">
                    <div class="nav_menu_title ui-accordion-header ui-state-default ui-corner-all ui-accordion-icons"
                        role="tab" id="ui-id-13" aria-controls="ui-id-14" aria-selected="false" aria-expanded="false"
                        tabindex="-1"><span
                            class="ui-accordion-header-icon ui-icon ui-icon-triangle-1-e"></span><a><strong
                                class="title">스니커즈</strong><span class="nav_kr">Sneakers</span></a></div>
                    <div class="item_sub_menu ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom"
                        id="ui-id-14" aria-labelledby="ui-id-13" role="tabpanel" aria-hidden="true"
                        style="display: none;">
                        <div class="item_sub_menu_all"><a href="https://www.musinsa.com/categories/item/018"> 전체 <span>
                                    (9,890)</span></a></div>
                        <ul class="nav_category_menu">
                            <li><a href="https://www.musinsa.com/categories/item/018002"> 캔버스/단화 <span>
                                        (5,351)</span></a></li>
                        </ul>
                        <ul class="nav_category_menu">
                            <li><a href="https://www.musinsa.com/categories/item/018003"> 패션스니커즈화 <span>
                                        (2,153)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/018004"> 기타 스니커즈 <span>
                                        (2,386)</span></a></li>
                        </ul>
                    </div>
                </div>
                <div role="tablist" class="nav_category item_menu_btn">
                    <div class="nav_menu_title ui-accordion-header ui-state-default ui-corner-all ui-accordion-icons"
                        role="tab" id="ui-id-15" aria-controls="ui-id-16" aria-selected="false" aria-expanded="false"
                        tabindex="-1"><span
                            class="ui-accordion-header-icon ui-icon ui-icon-triangle-1-e"></span><a><strong
                                class="title">신발</strong><span class="nav_kr">Shoes</span></a></div>
                    <div class="item_sub_menu ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom"
                        id="ui-id-16" aria-labelledby="ui-id-15" role="tabpanel" aria-hidden="true"
                        style="display: none;">
                        <div class="item_sub_menu_all"><a href="https://www.musinsa.com/categories/item/005"> 전체 <span>
                                    (24,511)</span></a></div>
                        <ul class="nav_category_menu">
                            <li><a href="https://www.musinsa.com/categories/item/005014"> 구두 <span> (2,423)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/005015"> 로퍼 <span> (2,858)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/005012"> 힐/펌프스 <span>
                                        (2,977)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/005017"> 플랫 슈즈 <span>
                                        (1,141)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/005019"> 블로퍼 <span> (997)</span></a>
                            </li>
                        </ul>
                        <ul class="nav_category_menu">
                            <li><a href="https://www.musinsa.com/categories/item/005004"> 샌들 <span> (3,097)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/005018"> 슬리퍼 <span> (4,182)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/005006"> 기타 신발 <span>
                                        (1,322)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/005016"> 모카신/보트 슈즈 <span>
                                        (228)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/005011"> 부츠 <span> (5,085)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/005005"> 신발 용품 <span> (201)</span></a>
                            </li>
                        </ul>
                    </div>
                </div>
                <div role="tablist" class="nav_category item_menu_btn">
                    <div class="nav_menu_title ui-accordion-header ui-state-default ui-corner-all ui-accordion-icons"
                        role="tab" id="ui-id-17" aria-controls="ui-id-18" aria-selected="false" aria-expanded="false"
                        tabindex="-1"><span
                            class="ui-accordion-header-icon ui-icon ui-icon-triangle-1-e"></span><a><strong
                                class="title">가방</strong><span class="nav_kr">Bag</span></a></div>
                    <div class="item_sub_menu ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom"
                        id="ui-id-18" aria-labelledby="ui-id-17" role="tabpanel" aria-hidden="true"
                        style="display: none;">
                        <div class="item_sub_menu_all"><a href="https://www.musinsa.com/categories/item/004"> 전체 <span>
                                    (42,501)</span></a></div>
                        <ul class="nav_category_menu">
                            <li><a href="https://www.musinsa.com/categories/item/004001"> 백팩 <span> (4,641)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/004002"> 메신저/크로스 백 <span>
                                        (8,359)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/004003"> 숄더백 <span> (9,527)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/004015"> 토트백 <span> (5,076)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/004014"> 에코백 <span> (2,357)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/004006"> 보스턴/드럼/더플백 <span>
                                        (584)</span></a></li>
                        </ul>
                        <ul class="nav_category_menu">
                            <li><a href="https://www.musinsa.com/categories/item/004007"> 웨이스트 백 <span>
                                        (1,113)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/004013"> 파우치 백 <span>
                                        (2,380)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/004008"> 브리프케이스 <span> (555)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/004009"> 캐리어 <span> (783)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/004012"> 가방 소품 <span> (778)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/004016"> 지갑/머니클립 <span>
                                        (5,405)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/004005"> 클러치 백 <span> (943)</span></a>
                            </li>
                        </ul>
                    </div>
                </div>
                <div role="tablist" class="nav_category item_menu_btn">
                    <div class="nav_menu_title ui-accordion-header ui-state-default ui-corner-all ui-accordion-icons"
                        role="tab" id="ui-id-19" aria-controls="ui-id-20" aria-selected="false" aria-expanded="false"
                        tabindex="-1"><span
                            class="ui-accordion-header-icon ui-icon ui-icon-triangle-1-e"></span><a><strong
                                class="title">여성 가방</strong><span class="nav_kr">Women's bag</span></a></div>
                    <div class="item_sub_menu ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom"
                        id="ui-id-20" aria-labelledby="ui-id-19" role="tabpanel" aria-hidden="true"
                        style="display: none;">
                        <div class="item_sub_menu_all"><a href="https://www.musinsa.com/categories/item/054"> 전체 <span>
                                    (20,894)</span></a></div>
                        <ul class="nav_category_menu">
                            <li><a href="https://www.musinsa.com/categories/item/054001"> 크로스백 <span> (3,711)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/054002"> 토트백 <span> (3,734)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/054003"> 숄더백 <span> (8,401)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/054004"> 클러치 백 <span> (444)</span></a>
                            </li>
                        </ul>
                        <ul class="nav_category_menu">
                            <li><a href="https://www.musinsa.com/categories/item/054005"> 파우치 백 <span> (836)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/054006"> 백팩 <span> (592)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/054007"> 웨이스트 백 <span> (115)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/054008"> 지갑/머니클립 <span>
                                        (2,469)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/054009"> 가방 소품 <span> (592)</span></a>
                            </li>
                        </ul>
                    </div>
                </div>
                <div role="tablist" class="nav_category item_menu_btn">
                    <div class="nav_menu_title ui-accordion-header ui-state-default ui-corner-all ui-accordion-icons"
                        role="tab" id="ui-id-21" aria-controls="ui-id-22" aria-selected="false" aria-expanded="false"
                        tabindex="-1"><span
                            class="ui-accordion-header-icon ui-icon ui-icon-triangle-1-e"></span><a><strong
                                class="title">스포츠/용품</strong><span class="nav_kr">Sports/Goods</span></a></div>
                    <div class="item_sub_menu ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom"
                        id="ui-id-22" aria-labelledby="ui-id-21" role="tabpanel" aria-hidden="true"
                        style="display: none;">
                        <div class="item_sub_menu_all"><a href="https://www.musinsa.com/categories/item/017"> 전체 <span>
                                    (57,090)</span></a></div>
                        <ul class="nav_category_menu">
                            <li><a href="https://www.musinsa.com/categories/item/017016"> 상의 <span> (15,584)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/017017"> 스커트 <span> (1,755)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/017018"> 아우터 <span> (6,690)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/017019"> 원피스 <span> (233)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/017020"> 하의 <span> (8,583)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/017021"> 상하의세트 <span> (490)</span></a>
                            </li>
                        </ul>
                        <ul class="nav_category_menu">
                            <li><a href="https://www.musinsa.com/categories/item/017022"> 수영복/비치웨어 <span>
                                        (4,789)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/017023"> 스포츠신발 <span>
                                        (2,564)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/017024"> 기구/용품/장비 <span>
                                        (3,981)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/017025"> 스포츠가방 <span>
                                        (3,030)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/017026"> 스포츠잡화 <span>
                                        (3,699)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/017027"> 스포츠모자 <span>
                                        (3,258)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/017028"> 캠핑용품 <span> (2,436)</span></a>
                            </li>
                        </ul>
                    </div>
                </div>
                <div role="tablist" class="nav_category item_menu_btn">
                    <div class="nav_menu_title ui-accordion-header ui-state-default ui-corner-all ui-accordion-icons"
                        role="tab" id="ui-id-23" aria-controls="ui-id-24" aria-selected="false" aria-expanded="false"
                        tabindex="-1"><span
                            class="ui-accordion-header-icon ui-icon ui-icon-triangle-1-e"></span><a><strong
                                class="title">모자</strong><span class="nav_kr">Headwear</span></a></div>
                    <div class="item_sub_menu ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom"
                        id="ui-id-24" aria-labelledby="ui-id-23" role="tabpanel" aria-hidden="true"
                        style="display: none;">
                        <div class="item_sub_menu_all"><a href="https://www.musinsa.com/categories/item/007"> 전체 <span>
                                    (28,358)</span></a></div>
                        <ul class="nav_category_menu">
                            <li><a href="https://www.musinsa.com/categories/item/007001"> 캡/야구 모자 <span>
                                        (15,840)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/007002"> 헌팅캡/베레모 <span>
                                        (932)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/007003"> 페도라 <span> (368)</span></a>
                            </li>
                        </ul>
                        <ul class="nav_category_menu">
                            <li><a href="https://www.musinsa.com/categories/item/007004"> 버킷/사파리햇 <span>
                                        (4,810)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/007005"> 비니 <span> (4,174)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/007007"> 트루퍼 <span> (363)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/007006"> 기타 모자 <span>
                                        (1,871)</span></a></li>
                        </ul>
                    </div>
                </div>
                <div role="tablist" class="nav_category item_menu_btn">
                    <div class="nav_menu_title ui-accordion-header ui-state-default ui-corner-all ui-accordion-icons"
                        role="tab" id="ui-id-25" aria-controls="ui-id-26" aria-selected="false" aria-expanded="false"
                        tabindex="-1"><span
                            class="ui-accordion-header-icon ui-icon ui-icon-triangle-1-e"></span><a><strong
                                class="title">양말/레그웨어</strong><span class="nav_kr">Socks/Legwear</span></a></div>
                    <div class="item_sub_menu ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom"
                        id="ui-id-26" aria-labelledby="ui-id-25" role="tabpanel" aria-hidden="true"
                        style="display: none;">
                        <div class="item_sub_menu_all"><a href="https://www.musinsa.com/categories/item/008"> 전체 <span>
                                    (7,240)</span></a></div>
                        <ul class="nav_category_menu">
                            <li><a href="https://www.musinsa.com/categories/item/008001"> 양말 <span> (7,015)</span></a>
                            </li>
                        </ul>
                        <ul class="nav_category_menu">
                            <li><a href="https://www.musinsa.com/categories/item/008002"> 스타킹 <span> (225)</span></a>
                            </li>
                        </ul>
                    </div>
                </div>
                <div role="tablist" class="nav_category item_menu_btn">
                    <div class="nav_menu_title ui-accordion-header ui-state-default ui-corner-all ui-accordion-icons"
                        role="tab" id="ui-id-27" aria-controls="ui-id-28" aria-selected="false" aria-expanded="false"
                        tabindex="-1"><span
                            class="ui-accordion-header-icon ui-icon ui-icon-triangle-1-e"></span><a><strong
                                class="title">속옷</strong><span class="nav_kr">Underwear</span></a></div>
                    <div class="item_sub_menu ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom"
                        id="ui-id-28" aria-labelledby="ui-id-27" role="tabpanel" aria-hidden="true"
                        style="display: none;">
                        <div class="item_sub_menu_all"><a href="https://www.musinsa.com/categories/item/026"> 전체 <span>
                                    (10,154)</span></a></div>
                        <ul class="nav_category_menu">
                            <li><a href="https://www.musinsa.com/categories/item/026001"> 여성 속옷 상의 <span>
                                        (2,202)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/026002"> 여성 속옷 하의 <span>
                                        (1,049)</span></a></li>
                        </ul>
                        <ul class="nav_category_menu">
                            <li><a href="https://www.musinsa.com/categories/item/026003"> 여성 속옷 세트 <span>
                                        (1,093)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/026004"> 남성 속옷 <span>
                                        (2,196)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/026005"> 홈웨어 <span> (3,614)</span></a>
                            </li>
                        </ul>
                    </div>
                </div>
                <div role="tablist" class="nav_category item_menu_btn">
                    <div class="nav_menu_title ui-accordion-header ui-state-default ui-corner-all ui-accordion-icons"
                        role="tab" id="ui-id-29" aria-controls="ui-id-30" aria-selected="false" aria-expanded="false"
                        tabindex="-1"><span
                            class="ui-accordion-header-icon ui-icon ui-icon-triangle-1-e"></span><a><strong
                                class="title">선글라스/안경테</strong><span class="nav_kr">Eyewear</span></a></div>
                    <div class="item_sub_menu ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom"
                        id="ui-id-30" aria-labelledby="ui-id-29" role="tabpanel" aria-hidden="true"
                        style="display: none;">
                        <div class="item_sub_menu_all"><a href="https://www.musinsa.com/categories/item/009"> 전체 <span>
                                    (15,642)</span></a></div>
                        <ul class="nav_category_menu">
                            <li><a href="https://www.musinsa.com/categories/item/009002"> 안경 <span> (8,600)</span></a>
                            </li>
                        </ul>
                        <ul class="nav_category_menu">
                            <li><a href="https://www.musinsa.com/categories/item/009001"> 선글라스 <span> (6,766)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/009003"> 안경 소품 <span> (276)</span></a>
                            </li>
                        </ul>
                    </div>
                </div>
                <div role="tablist" class="nav_category item_menu_btn">
                    <div class="nav_menu_title ui-accordion-header ui-state-default ui-corner-all ui-accordion-icons"
                        role="tab" id="ui-id-31" aria-controls="ui-id-32" aria-selected="false" aria-expanded="false"
                        tabindex="-1"><span
                            class="ui-accordion-header-icon ui-icon ui-icon-triangle-1-e"></span><a><strong
                                class="title">액세서리</strong><span class="nav_kr">Accessory</span></a></div>
                    <div class="item_sub_menu ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom"
                        id="ui-id-32" aria-labelledby="ui-id-31" role="tabpanel" aria-hidden="true"
                        style="display: none;">
                        <div class="item_sub_menu_all"><a href="https://www.musinsa.com/categories/item/011"> 전체 <span>
                                    (12,055)</span></a></div>
                        <ul class="nav_category_menu">
                            <li><a href="https://www.musinsa.com/categories/item/011015"> 마스크 <span> (991)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/011012"> 키링/키케이스 <span>
                                        (1,627)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/011007"> 벨트 <span> (2,035)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/011009"> 넥타이 <span> (1,283)</span></a>
                            </li>
                        </ul>
                        <ul class="nav_category_menu">
                            <li><a href="https://www.musinsa.com/categories/item/011010"> 머플러 <span> (2,914)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/011014"> 스카프/반다나 <span>
                                        (1,168)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/011011"> 장갑 <span> (1,130)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/011006"> 기타 액세서리 <span>
                                        (903)</span></a></li>
                        </ul>
                    </div>
                </div>
                <div role="tablist" class="nav_category item_menu_btn">
                    <div class="nav_menu_title ui-accordion-header ui-state-default ui-corner-all ui-accordion-icons"
                        role="tab" id="ui-id-33" aria-controls="ui-id-34" aria-selected="false" aria-expanded="false"
                        tabindex="-1"><span
                            class="ui-accordion-header-icon ui-icon ui-icon-triangle-1-e"></span><a><strong
                                class="title">시계</strong><span class="nav_kr">Watch</span></a></div>
                    <div class="item_sub_menu ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom"
                        id="ui-id-34" aria-labelledby="ui-id-33" role="tabpanel" aria-hidden="true"
                        style="display: none;">
                        <div class="item_sub_menu_all"><a href="https://www.musinsa.com/categories/item/006"> 전체 <span>
                                    (8,133)</span></a></div>
                        <ul class="nav_category_menu">
                            <li><a href="https://www.musinsa.com/categories/item/006003"> 디지털 <span> (745)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/006004"> 쿼츠 아날로그 <span>
                                        (5,620)</span></a></li>
                        </ul>
                        <ul class="nav_category_menu">
                            <li><a href="https://www.musinsa.com/categories/item/006005"> 오토매틱 아날로그 <span>
                                        (395)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/006006"> 시계 용품 <span>
                                        (1,028)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/006002"> 기타 시계 <span> (345)</span></a>
                            </li>
                        </ul>
                    </div>
                </div>
                <div role="tablist" class="nav_category item_menu_btn">
                    <div class="nav_menu_title ui-accordion-header ui-state-default ui-corner-all ui-accordion-icons"
                        role="tab" id="ui-id-35" aria-controls="ui-id-36" aria-selected="false" aria-expanded="false"
                        tabindex="-1"><span
                            class="ui-accordion-header-icon ui-icon ui-icon-triangle-1-e"></span><a><strong
                                class="title">주얼리</strong><span class="nav_kr">Jewelry</span></a></div>
                    <div class="item_sub_menu ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom"
                        id="ui-id-36" aria-labelledby="ui-id-35" role="tabpanel" aria-hidden="true"
                        style="display: none;">
                        <div class="item_sub_menu_all"><a href="https://www.musinsa.com/categories/item/025"> 전체 <span>
                                    (44,431)</span></a></div>
                        <ul class="nav_category_menu">
                            <li><a href="https://www.musinsa.com/categories/item/025001"> 팔찌 <span> (8,885)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/025002"> 반지 <span> (8,040)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/025003"> 목걸이/펜던트 <span>
                                        (13,117)</span></a></li>
                        </ul>
                        <ul class="nav_category_menu">
                            <li><a href="https://www.musinsa.com/categories/item/025004"> 귀걸이 <span> (11,951)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/025005"> 발찌 <span> (505)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/025006"> 브로치/배지 <span> (412)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/025007"> 헤어 액세서리 <span>
                                        (1,521)</span></a></li>
                        </ul>
                    </div>
                </div>
                <div role="tablist" class="nav_category item_menu_btn">
                    <div class="nav_menu_title ui-accordion-header ui-state-default ui-corner-all ui-accordion-icons"
                        role="tab" id="ui-id-37" aria-controls="ui-id-38" aria-selected="false" aria-expanded="false"
                        tabindex="-1"><span
                            class="ui-accordion-header-icon ui-icon ui-icon-triangle-1-e"></span><a><strong
                                class="title">뷰티</strong><span class="nav_kr">Beauty</span></a></div>
                    <div class="item_sub_menu ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom"
                        id="ui-id-38" aria-labelledby="ui-id-37" role="tabpanel" aria-hidden="true"
                        style="display: none;">
                        <div class="item_sub_menu_all"><a href="https://www.musinsa.com/categories/item/015"> 전체 <span>
                                    (17,738)</span></a></div>
                        <ul class="nav_category_menu">
                            <li><a href="https://www.musinsa.com/categories/item/015002"> 스킨케어 <span> (5,133)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/015009"> 클렌징 <span> (1,251)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/015006"> 베이스 메이크업 <span>
                                        (887)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/015016"> 포인트 메이크업 <span>
                                        (1,648)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/015010"> 바디케어 <span> (2,079)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/015011"> 쉐이빙/제모 <span> (179)</span></a>
                            </li>
                        </ul>
                        <ul class="nav_category_menu">
                            <li><a href="https://www.musinsa.com/categories/item/015001"> 헤어케어 <span> (1,717)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/015007"> 향수/탈취 <span>
                                        (1,836)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/015014"> 뷰티 디바이스 <span>
                                        (632)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/015012"> 다이어트/헬스 <span>
                                        (509)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/015013"> 미용 소품 <span>
                                        (1,758)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/015015"> 덴탈케어 <span> (336)</span></a>
                            </li>
                        </ul>
                    </div>
                </div>
                <div role="tablist" class="nav_category item_menu_btn">
                    <div class="nav_menu_title ui-accordion-header ui-state-default ui-corner-all ui-accordion-icons"
                        role="tab" id="ui-id-39" aria-controls="ui-id-40" aria-selected="false" aria-expanded="false"
                        tabindex="-1"><span
                            class="ui-accordion-header-icon ui-icon ui-icon-triangle-1-e"></span><a><strong
                                class="title">디지털/테크</strong><span class="nav_kr">Digital/Tech</span></a></div>
                    <div class="item_sub_menu ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom"
                        id="ui-id-40" aria-labelledby="ui-id-39" role="tabpanel" aria-hidden="true"
                        style="display: none;">
                        <div class="item_sub_menu_all"><a href="https://www.musinsa.com/categories/item/012"> 전체 <span>
                                    (43,468)</span></a></div>
                        <ul class="nav_category_menu">
                            <li><a href="https://www.musinsa.com/categories/item/012001"> 이어폰 <span> (218)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/012002"> 헤드폰 <span> (124)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/012003"> 스피커 <span> (188)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/012004"> 케이스/슬리브 <span>
                                        (35,472)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/012010"> 휴대폰/태블릿 <span> (78)</span></a>
                            </li>
                        </ul>
                        <ul class="nav_category_menu">
                            <li><a href="https://www.musinsa.com/categories/item/012011"> 노트북 <span> (106)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/012012"> 모니터 <span> (57)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/012009"> 충전기/케이블 <span>
                                        (901)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/012005"> 거치대 <span> (3,080)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/012006"> 카메라/카메라용품 <span>
                                        (99)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/012008"> 기타 디지털/테크 <span>
                                        (3,145)</span></a></li>
                        </ul>
                    </div>
                </div>
                <div role="tablist" class="nav_category item_menu_btn">
                    <div class="nav_menu_title ui-accordion-header ui-state-default ui-corner-all ui-accordion-icons"
                        role="tab" id="ui-id-41" aria-controls="ui-id-42" aria-selected="false" aria-expanded="false"
                        tabindex="-1"><span
                            class="ui-accordion-header-icon ui-icon ui-icon-triangle-1-e"></span><a><strong
                                class="title">생활/취미/예술</strong><span class="nav_kr">Life</span></a></div>
                    <div class="item_sub_menu ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom"
                        id="ui-id-42" aria-labelledby="ui-id-41" role="tabpanel" aria-hidden="true"
                        style="display: none;">
                        <div class="item_sub_menu_all"><a href="https://www.musinsa.com/categories/item/013"> 전체 <span>
                                    (21,696)</span></a></div>
                        <ul class="nav_category_menu">
                            <li><a href="https://www.musinsa.com/categories/item/013012"> 우산 <span> (198)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/013004"> 가구/조명 <span>
                                        (1,881)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/013006"> 침구/쿠션/담요 <span>
                                        (2,303)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/013007"> 러그/매트/수건 <span>
                                        (965)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/013003"> 디퓨저/캔들 <span>
                                        (1,420)</span></a></li>
                        </ul>
                        <ul class="nav_category_menu">
                            <li><a href="https://www.musinsa.com/categories/item/013002"> 액자/포스터 <span>
                                        (3,354)</span></a></li>
                            <li><a href="https://www.musinsa.com/categories/item/013008"> 키친 <span> (3,086)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/013013"> 텀블러 <span> (735)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/013005"> 문구 <span> (1,937)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/013001"> 토이 <span> (4,070)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/013011"> 기타 라이프 <span>
                                        (1,747)</span></a></li>
                        </ul>
                    </div>
                </div>
                <div role="tablist" class="nav_category item_menu_btn">
                    <div class="nav_menu_title ui-accordion-header ui-state-default ui-corner-all ui-accordion-icons"
                        role="tab" id="ui-id-43" aria-controls="ui-id-44" aria-selected="false" aria-expanded="false"
                        tabindex="-1"><span
                            class="ui-accordion-header-icon ui-icon ui-icon-triangle-1-e"></span><a><strong
                                class="title">책/음악/티켓</strong><span class="nav_kr">Culture</span></a></div>
                    <div class="item_sub_menu ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom"
                        id="ui-id-44" aria-labelledby="ui-id-43" role="tabpanel" aria-hidden="true"
                        style="display: none;">
                        <div class="item_sub_menu_all"><a href="https://www.musinsa.com/categories/item/014"> 전체 <span>
                                    (570)</span></a></div>
                        <ul class="nav_category_menu">
                            <li><a href="https://www.musinsa.com/categories/item/014001"> 잡지/무크지 <span> (78)</span></a>
                            </li>
                        </ul>
                        <ul class="nav_category_menu">
                            <li><a href="https://www.musinsa.com/categories/item/014003"> 아트 <span> (409)</span></a>
                            </li>
                            <li><a href="https://www.musinsa.com/categories/item/014002"> 기타 컬처 <span> (83)</span></a>
                            </li>
                        </ul>
                    </div>
                </div>
                <div role="tablist" class="nav_category item_menu_btn">
                    <div class="nav_menu_title ui-accordion-header ui-state-default ui-corner-all ui-accordion-icons"
                        role="tab" id="ui-id-45" aria-controls="ui-id-46" aria-selected="false" aria-expanded="false"
                        tabindex="-1"><span
                            class="ui-accordion-header-icon ui-icon ui-icon-triangle-1-e"></span><a><strong
                                class="title">반려동물</strong><span class="nav_kr">Pet</span></a></div>
                    <div class="item_sub_menu ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom"
                        id="ui-id-46" aria-labelledby="ui-id-45" role="tabpanel" aria-hidden="true"
                        style="display: none;">
                        <div class="item_sub_menu_all"><a href="https://www.musinsa.com/categories/item/021"> 전체 <span>
                                    (3,471)</span></a></div>
                        <ul class="nav_category_menu">
                            <li><a href="https://www.musinsa.com/categories/item/021004"> 반려동물 의류 <span>
                                        (2,040)</span></a></li>
                        </ul>
                        <ul class="nav_category_menu">
                            <li><a href="https://www.musinsa.com/categories/item/021002"> 반려동물용품 <span>
                                        (1,431)</span></a></li>
                        </ul>
                    </div>
                </div>
            </nav>
        </div>
    </div>
    <div class="section-tabbox-left">
        <div class="tabBox">
            <ul class="snb snb-multi">
                <li data-for="ranking" class="box-tab-btn tab-btn btn tab-box-ranking active"><a
                        href="javascript:void(0);"><span>랭킹</span></a></li>
                <li data-for="new" class="box-tab-btn tab-btn btn tab-box-new"><a
                        href="javascript:void(0);"><span>업데이트</span></a></li>
                <li data-for="sale" class="box-tab-btn tab-btn btn tab-box-sale"><a
                        href="javascript:void(0);"><span>세일</span></a></li>
                <li data-for="exclusive" class="box-tab-btn tab-btn btn tab-box-exclusive"><a
                        href="javascript:void(0);"><span>단독</span></a></li>
            </ul>
            <div id="left_ranking_area" class="tab ranking active">
                <div class="box-page">
                    <ul class="box-indicate">
                        <li code="0" style="margin-right: 4px;"><a href="javascript:void(0);" class="link-text">상품</a>
                        </li>
                        <li code="23" style="margin-right: 4px;"><a href="javascript:void(0);"
                                class="link-text active">브랜드</a></li>
                    </ul>
                    <div class="box-btn"><a href="https://search.musinsa.com/ranking/brand"
                            class="link-text active">전체</a><a id="left_ranking_prev" class="nav-btn btn btn-prev"
                            style="margin-left: 4px;">&lt; </a><a id="left_ranking_next" class="nav-btn btn">&gt;</a>
                    </div>
                </div>
                <div class="box-swipe">
                    <ul class="box-swipe-list">
                        <li class="box-swipe-contents">
                            <ul class="box_item box-brand">
                                <li class="li_box">
                                    <div class="li_inner">
                                        <div class="list_img"><a
                                                href="https://www.musinsa.com/brands/musinsastandard"><span
                                                    class="icon_event"> 1 </span>
                                                <!----><img
                                                    src="https://image.msscdn.net/mfile_s01/_brand/free_medium/musinsastandard.png?2022102200"
                                                    alt="musinsastandard"><span class="vertical_standard"></span>
                                            </a></div>
                                        <div class="article_info">
                                            <p class="item_title"><a
                                                    href="https://www.musinsa.com/brands/musinsastandard">무신사...</a><span
                                                    class="icon-rank rank-stay"></span></p>
                                            <!---->
                                        </div>
                                    </div>
                                </li>
                                <li class="li_box">
                                    <div class="li_inner">
                                        <div class="list_img"><a href="https://www.musinsa.com/brands/adidas"><span
                                                    class="icon_event"> 2 </span>
                                                <!----><img
                                                    src="https://image.msscdn.net/mfile_s01/_brand/free_medium/adidas.png?2022102200"
                                                    alt="adidas"><span class="vertical_standard"></span>
                                            </a></div>
                                        <div class="article_info">
                                            <p class="item_title"><a
                                                    href="https://www.musinsa.com/brands/adidas">아디다...</a><span
                                                    class="icon-rank rank-up"></span></p>
                                            <!---->
                                        </div>
                                    </div>
                                </li>
                                <li class="li_box">
                                    <div class="li_inner">
                                        <div class="list_img"><a
                                                href="https://www.musinsa.com/brands/lafudgestore"><span
                                                    class="icon_event"> 3 </span>
                                                <!----><img
                                                    src="https://image.msscdn.net/mfile_s01/_brand/free_medium/lafudgestore.png?2022102200"
                                                    alt="lafudgestore"><span class="vertical_standard"></span>
                                            </a></div>
                                        <div class="article_info">
                                            <p class="item_title"><a
                                                    href="https://www.musinsa.com/brands/lafudgestore">라퍼지...</a><span
                                                    class="icon-rank rank-down"></span></p>
                                            <!---->
                                        </div>
                                    </div>
                                </li>
                                <li class="li_box">
                                    <div class="li_inner">
                                        <div class="list_img"><a href="https://www.musinsa.com/brands/yale"><span
                                                    class="icon_best"> 4 </span>
                                                <!----><img
                                                    src="https://image.msscdn.net/mfile_s01/_brand/free_medium/yale.png?2022102200"
                                                    alt="yale"><span class="vertical_standard"></span>
                                            </a></div>
                                        <div class="article_info">
                                            <p class="item_title"><a
                                                    href="https://www.musinsa.com/brands/yale">예일</a><span
                                                    class="icon-rank rank-down"></span></p>
                                            <!---->
                                        </div>
                                    </div>
                                </li>
                                <li class="li_box">
                                    <div class="li_inner">
                                        <div class="list_img"><a href="https://www.musinsa.com/brands/covernat"><span
                                                    class="icon_best"> 5 </span>
                                                <!----><img
                                                    src="https://image.msscdn.net/mfile_s01/_brand/free_medium/covernat.png?2022102200"
                                                    alt="covernat"><span class="vertical_standard"></span>
                                            </a></div>
                                        <div class="article_info">
                                            <p class="item_title"><a
                                                    href="https://www.musinsa.com/brands/covernat">커버낫</a><span
                                                    class="icon-rank rank-stay"></span></p>
                                            <!---->
                                        </div>
                                    </div>
                                </li>
                                <li class="li_box">
                                    <div class="li_inner">
                                        <div class="list_img"><a
                                                href="https://www.musinsa.com/brands/thisisneverthat"><span
                                                    class="icon_best"> 6 </span>
                                                <!----><img
                                                    src="https://image.msscdn.net/mfile_s01/_brand/free_medium/thisisneverthat.png?2022102200"
                                                    alt="thisisneverthat"><span class="vertical_standard"></span>
                                            </a></div>
                                        <div class="article_info">
                                            <p class="item_title"><a
                                                    href="https://www.musinsa.com/brands/thisisneverthat">디스이...</a><span
                                                    class="icon-rank rank-up"></span></p>
                                            <!---->
                                        </div>
                                    </div>
                                </li>
                                <li class="li_box">
                                    <div class="li_inner">
                                        <div class="list_img"><a href="https://www.musinsa.com/brands/suare"><span
                                                    class="icon_best"> 7 </span>
                                                <!----><img
                                                    src="https://image.msscdn.net/mfile_s01/_brand/free_medium/suare.png?2022102200"
                                                    alt="suare"><span class="vertical_standard"></span>
                                            </a></div>
                                        <div class="article_info">
                                            <p class="item_title"><a
                                                    href="https://www.musinsa.com/brands/suare">수아레</a><span
                                                    class="icon-rank rank-down"></span></p>
                                            <!---->
                                        </div>
                                    </div>
                                </li>
                                <li class="li_box">
                                    <div class="li_inner">
                                        <div class="list_img"><a href="https://www.musinsa.com/brands/codegraphy"><span
                                                    class="icon_best"> 8 </span>
                                                <!----><img
                                                    src="https://image.msscdn.net/mfile_s01/_brand/free_medium/codegraphy.png?2022102200"
                                                    alt="codegraphy"><span class="vertical_standard"></span>
                                            </a></div>
                                        <div class="article_info">
                                            <p class="item_title"><a
                                                    href="https://www.musinsa.com/brands/codegraphy">코드그...</a><span
                                                    class="icon-rank rank-up"></span></p>
                                            <!---->
                                        </div>
                                    </div>
                                </li>
                                <li class="li_box">
                                    <div class="li_inner">
                                        <div class="list_img"><a href="https://www.musinsa.com/brands/partimento"><span
                                                    class="icon_best"> 9 </span>
                                                <!----><img
                                                    src="https://image.msscdn.net/mfile_s01/_brand/free_medium/partimento.png?2022102200"
                                                    alt="partimento"><span class="vertical_standard"></span>
                                            </a></div>
                                        <div class="article_info">
                                            <p class="item_title"><a
                                                    href="https://www.musinsa.com/brands/partimento">파르티...</a><span
                                                    class="icon-rank rank-down"></span></p>
                                            <!---->
                                        </div>
                                    </div>
                                </li>
                            </ul>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <div class="box_cs_left">
        <h2 class="txt_tel_left font-mss"><i class="fa fa-phone"></i> 1544-7199 </h2>
        <p class="font_basic">오전9시~오후6시 운영 / 토,일,휴일 휴무</p>
        <div class="box_info_left font_basic">
            <p>- 전화 전 <a href="https://www.musinsa.com/app/cs/faq">자주 묻는 질문</a>을 확인하세요.</p>
            <p>- <a href="https://www.musinsa.com/app/cs/counsel">1:1문의</a>를 통해서도 상담이 가능합니다.</p>
            <p>- 상품 문의는 각 상품 Q&amp;A를 이용하세요.</p>
        </div>
    </div>
    <ul class="left_basic_btn box_bottom_left">
        <li><a href="https://www.musinsa.com/app/reviews/lists" class="plain-btn btn">회원후기</a></li>
        <li><a href="https://www.musinsa.com/member/benefit" class="plain-btn btn">회원 혜택</a></li>
        <li><a href="https://www.musinsa.com/app/cs/notice_list" class="plain-btn btn">공지사항</a></li>
    </ul>
</div>

 

2. category.py

from bs4 import BeautifulSoup

page = open("nav_left_menu.html", "rt", encoding="utf-8").read()
soup = BeautifulSoup(page, 'html.parser')


# 카테고리 정보 출력
# 카테고리 : [021]반려동물(Pet)
category_list = soup.find_all("div", attrs={"class":"nav_category"})
for category in category_list:
    # 카테고리명 출력
    category_title_kr = category.find("strong", attrs={"class":"title"}).get_text().strip()
    category_title_en = category.find("span", attrs={"class":"nav_kr"}).get_text().strip()
    # 카테고리 번호 출력
    number = category.find("div", attrs={"class":"item_sub_menu_all"})
    # 인기 카테고리 예외 처리
    if number != None:
        category_number = number.a["href"]
        category_number = category_number[len(category_number)-3:]
    else:
        category_number = "000" # 인기 카테고리 임시 번호 지정
    
    print(f"카테고리 : [{category_number}]{category_title_kr}({category_title_en})")



# 세부 카테고리 출력하기
# 카테고리 : [021][002] 반려동물용품
sub_category_list = soup.find_all("ul", attrs={"class":"nav_category_menu"})
for sub_category in sub_category_list:
    # 세부 카테고리명 출력
    sub_category_title, count = sub_category.a.get_text().split("(")
    sub_category_title = sub_category_title.strip()
    # 세부 카테고리 번호 출력 (메인 / 서브)
    sub_category_number = sub_category.a["href"]
    sub_category_number = sub_category_number[len(sub_category_number)-6:]
    main_category_number = sub_category_number[:3]
    sub_category_number = sub_category_number[3:]
    print(f"카테고리 : [{main_category_number}][{sub_category_number}] {sub_category_title}")

[출력 내용]

# 메인 카테고리
# 카테고리 : [mainCategory]카테고리명(영문명)

카테고리 : [000]인기(Best)
카테고리 : [001]상의(Top)
카테고리 : [002]아우터(Outer)
카테고리 : [003]바지(Pants)
카테고리 : [020]원피스(Onepiece)
카테고리 : [022]스커트(Skirt)
카테고리 : [018]스니커즈(Sneakers)
카테고리 : [005]신발(Shoes)
카테고리 : [004]가방(Bag)
카테고리 : [054]여성 가방(Womens bag)
카테고리 : [017]스포츠/용품(Sports/Goods)
카테고리 : [007]모자(Headwear)
카테고리 : [008]양말/레그웨어(Socks/Legwear)
카테고리 : [026]속옷(Underwear)
카테고리 : [009]선글라스/안경테(Eyewear)
카테고리 : [011]액세서리(Accessory)
카테고리 : [006]시계(Watch)
카테고리 : [025]주얼리(Jewelry)
카테고리 : [015]뷰티(Beauty)
카테고리 : [012]디지털/테크(Digital/Tech)
카테고리 : [013]생활/취미/예술(Life)
카테고리 : [014]책/음악/티켓(Culture)
카테고리 : [021]반려동물(Pet)


# 세부 카테고리
# 카테고리 : [mainCategory][subCategory]세부 카테고리명

카테고리 : [003][002] 데님 팬츠
카테고리 : [001][005] 맨투맨/스웨트셔츠
카테고리 : [001][001] 반소매 티셔츠
카테고리 : [001][003] 피케/카라 티셔츠
카테고리 : [002][022] 후드 집업
카테고리 : [002][008] 환절기 코트
카테고리 : [003][002] 데님 팬츠
카테고리 : [003][009] 숏 팬츠
카테고리 : [020][006] 미니 원피스
카테고리 : [020][007] 미디 원피스
카테고리 : [022][001] 미니스커트
카테고리 : [022][002] 미디스커트
카테고리 : [018][002] 캔버스/단화
카테고리 : [018][003] 패션스니커즈화
카테고리 : [005][014] 구두
카테고리 : [005][004] 샌들
카테고리 : [004][001] 백팩
카테고리 : [004][007] 웨이스트 백
카테고리 : [054][001] 크로스백
카테고리 : [054][005] 파우치 백
카테고리 : [017][016] 상의
카테고리 : [017][022] 수영복/비치웨어
카테고리 : [007][001] 캡/야구 모자
카테고리 : [007][004] 버킷/사파리햇
카테고리 : [008][001] 양말
카테고리 : [008][002] 스타킹
카테고리 : [026][001] 여성 속옷 상의
카테고리 : [026][003] 여성 속옷 세트
카테고리 : [009][002] 안경
카테고리 : [009][001] 선글라스
카테고리 : [011][015] 마스크
카테고리 : [011][010] 머플러
카테고리 : [006][003] 디지털
카테고리 : [006][005] 오토매틱 아날로그
카테고리 : [025][001] 팔찌
카테고리 : [025][004] 귀걸이
카테고리 : [015][002] 스킨케어
카테고리 : [015][001] 헤어케어
카테고리 : [012][001] 이어폰
카테고리 : [012][011] 노트북
카테고리 : [013][012] 우산
카테고리 : [013][002] 액자/포스터
카테고리 : [014][001] 잡지/무크지
카테고리 : [014][003] 아트
카테고리 : [021][004] 반려동물 의류
카테고리 : [021][002] 반려동물용품
728x90
반응형