Created
April 18, 2020 17:21
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 페이지 관련 태그를 가져와 필요한 태그를 모두 조회 | |
pages = html_parse.find("div", {"class": "pagination"}).find_all('a') | |
page_list = [] | |
# pagination 리스트의 마지막이 next라서 제외 한 뒤에 마지막 page를 가져옴 | |
for page in pages[:-1]: | |
page_value = int(page.find('span').string) | |
page_list.append(page_value) | |
max_page = page_list[-1] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment