파이썬 나만의 지니뮤직 차트순위 크롤링하기 #1
·
Coding/Crawling
파이썬 크롤링을 배워서 뮤직차트 순위를 크롤링해보자 한다. 먼저 크롤링에 필요한 Beautifulsoup을 다운해야 한다. pip install beautifulsoup4 명령어로 쉽게 다운받을수있다. from urllib.request import urlopen from bs4 import BeautifulSoup html = urlopen("https://www.naver.com/") bs = BeautifulSoup(html, "html.parser") print(bs) 먼저 위의 코드를 써서 네이버메인을 크롤링해보면 이렇게 html코드들을 볼수있다 사실은 훨씬 긴데 내가 알아서 잘랏다 이제 여기서 내가 원하는 정보들만 골라서 크롤링을하면 나만의 웹크롤러를 만들수있다.
Junyoung.dev