강의

멘토링

커뮤니티

Inflearn Community Q&A

qhdgkdbs0142's profile image
qhdgkdbs0142

asked

Introduction to Python and Creating Various Automated Applications Using Web Crawling

How to use BeautifulSoup and Basic Web Parsing (2)

'class':'alchol'라고 하였는데....

Written on

·

120

0

질문드립니당

<li class="alcohol high" data-lo="cn">양주

에서 양주의 class는 alcohol high 라고 적혀있는데,

"""

param = {'data-lo':'cn','class':'alcohol'}

print("5",soup.find("li",param).string)

"""

에서는 왜 class가 alcohol이라고 되어있는건가요?ㅠㅠ

python웹-크롤링

Answer 1

0

niceman님의 프로필 이미지
niceman
Instructor

안녕하세요. 봉하윤님

클래스 네임이 alcohol high 이라는것은

  1. alcohol 클래스 이름과

  2. high 클래스 이름으로 각각 선택할 수 있습니다.

즉, alcohol 로 선택이 가능합니다.!

css 선택자 부분을 강의 내용에서 사이트를 보시고 학습하시면 좀 더 쉽게 이해가 가능하실 거예요.

감사합니다.

qhdgkdbs0142's profile image
qhdgkdbs0142

asked

Ask a question