import requests
from bs4 import BeautifulSoup
url=requests.get('https://coinmarketcap.com/ko/')
html=url.text
soup=BeautifulSoup(html,'html.parser')
title=soup.select('#__next > div > div.main-content > div
.sc-57oli2-0.dEqHl.cmc-body-wrapper > div > div > div.tableWrapper___3utdq
.cmc-table-homepage-wrapper___22rL4 > table > tbody > tr:nth-child(58)
> td:nth-child(7) > p')
qwer=[]
for item in zip(title):
qwer.append(
{
item[0].text
}
)
print(qwer)
https://coinmarketcap.com/ko/여기서 크롤링하는 프로그램 만드는 중인데 저게 1~10번째 시가총액까지는 출력이 되는데 위에 예시처럼 11째 부터는 출력이 안됨... 위에 예시는 58번째이고 tr:nth-child(58)이부분에 있는 숫자만 바꾸면 되는데 이게 11 이상이면 출력이 안되는것 같아 이유가 뭘까?
댓글 0