강의

멘토링

커뮤니티

Inflearn Community Q&A

mulju's profile image
mulju

asked

The Most Powerful Crawling Technology Today: Mastering Scrapy and Selenium

Real-world Crawling: Crawling Gmarket and Learning How to Use Scrapy in Real-world 3

8분 부분 질문

Written on

·

160

0

div.best-list를 한번에 입력하여 넣지 않고 두번째인

best-list[1]를 적용하는 취지는 정말 잘 이해가 갑니다. 하지만

첫번째 best-list가 있는 div는 클래스명이 "best-list type2"

인데 

이렇게 클래스명이 완전히 같지 않은 경우에도 response.css("div.best-list")에 걸러지나요?

seleniumscrapy웹-크롤링

Answer 1

0

funcoding님의 프로필 이미지
funcoding
Instructor

안녕하세요.

div.best-list.type2 로 정확히 css selector 를 선택해줄 수도 있긴 해요. 다만 div.best-list 로 해도, 처음 클래스명이 best-list 이기 때문에, 관련 데이터를 크롤링하는데 문제가 없다면, 이 정도만 써줘도 되었어서, 그렇게 작성을 해보았습니다.

감사합니다.

mulju's profile image
mulju

asked

Ask a question