728x90 multi-items1 [Python] 파이썬으로 크롤링하기 part.5 (여러 페이지에서 많은 아이템 가져오기) 이전과 같은 페이지인 http://jekyllthemes.org/ 에서 아이템을 반복해서 가져오도록 한다. Jekyll Themes jekyllthemes.org 접속 후 F12를 눌러 dev tool의 Elements로 이동한다.이렇게 무수히 많은 item들이 있는데, 이 화면의 item을 모두 가져와보자.import requestsfrom bs4 import BeautifulSoupresponse = requests.get("http://jekyllthemes.org")html = response.textsoup = BeautifulSoup(html, 'html.parser')soup.select_one(".item")전 시간에 했던 것 처럼 우선 맨 처음의 item을 가져와본다.Adam Blog v.. 2024. 8. 1. 이전 1 다음 728x90