• 카테고리

    질문 & 답변
  • 세부 분야

    업무 자동화

  • 해결 여부

    미해결

오류 해결이 안되네요

21.07.07 17:30 작성 조회수 92

0

이틀째 해결을 못하고 있네요

혹시 빠진 데이타가 있나해서  순서대로 입력해도 같은 오류가 나네요

a_element = li_element.select("div.total_wrap > a")

type(a_element)


bs4.element.ResultSet

a_element = li_element.select("div.total_wrap > a")[0]

type(a_element)

---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
<ipython-input-89-7b9166b2d17d> in <module>
----> 1 a_element = li_element.select("div.total_wrap > a")[0]
      2 type(a_element)

IndexError: list index out of range

답변 1

답변을 작성해보세요.

0

안녕하세요!

그새 네이버 사이트 구조가 바뀌었네요 ㅠ (div.total_wrap 과 a tag 사이에 div 엘리먼트가 하나 더 생겼습니다) 해당부분 반영해서 수업자료 새로 업로드했습니다.

감사합니다