Skip to content
This repository has been archived by the owner on Aug 5, 2022. It is now read-only.

네스프레쏘 사이트 웹크롤링해서 값들 Mongodb에 저장 #9

Closed
unchaptered opened this issue Jul 11, 2022 · 0 comments
Closed
Assignees
Labels
add documentation Improvements or additions to documentation

Comments

@unchaptered
Copy link
Owner

unchaptered commented Jul 11, 2022

작성자 란에 오류가 발생하여 다른 사람으로 변경되어 있습니다.
원 작성자는 JeungHoSub 님이십니다.

웹개발 종합반 강의 중 웹크롤링 부분 다시 보면서 따라하고 있는데,

coffees = soup.select('#PLPListContainer > div')

for coffee in coffees:
a = coffee.select_one('div.cn_card__image > a > img')
if a is not None:

아직 이 정도고 더 보완하겠습니다~


    • 커피 값 셀렉터 -

[커피_이름]

#PLPListContainer > div:nth-child(6) > nb-plp-category > article > nb-container:nth-child(2) > section > div > div > div.cb-plp-category--center > div > nb-plp-product-card:nth-child(7) > div.cn_card__content > h3 > a

[커피_설명]

#PLPListContainer > div:nth-child(6) > nb-plp-category > article > nb-container:nth-child(2) > section > div > div > div.cb-plp-category--center > div > nb-plp-product-card:nth-child(7) > div.cn_card__content > p

[용량]

#PLPListContainer > div:nth-child(6) > nb-plp-category > article > nb-container:nth-child(2) > section > div > div > div.cb-plp-category--center > div > nb-plp-product-card:nth-child(7) > div.cn_card__content > h3 > p.ml-sizes

[강도]

#PLPListContainer > div:nth-child(6) > nb-plp-category > article > nb-container:nth-child(2) > section > div > div > div.cb-plp-category--center > div > nb-plp-product-card:nth-child(7) > div.cn_card__content > nb-intensity > div > div.intensity

[산미]

#PLPListContainer > div:nth-child(6) > nb-plp-category > article > nb-container:nth-child(2) > section > div > div > div.cb-plp-category--center > div > nb-plp-product-card:nth-child(7) > div.cn_card__content > nb-intensity > div > div.acidity

[가격]

#PLPListContainer > div:nth-child(6) > nb-plp-category > article > nb-container:nth-child(2) > section > div > div > div.cb-plp-category--center > div > nb-plp-product-card:nth-child(7) > div.cn_card__content > div > div > p.cn_card__priceWrapper--current > span

[캡슐 수]

#PLPListContainer > div:nth-child(5) > nb-plp-category > article > nb-container:nth-child(2) > section > div > div > div.cb-plp-category--center > div > nb-plp-product-card:nth-child(7) > div.cn_card__content > div > div > p.cn_card__priceWrapper--items.showSleeve

@unchaptered unchaptered added documentation Improvements or additions to documentation add labels Jul 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
add documentation Improvements or additions to documentation
Projects
No open projects
Development

No branches or pull requests

2 participants