Skip to content

Instantly share code, notes, and snippets.

@SeokRae
Created April 18, 2020 17:21
# 페이지 관련 태그를 가져와 필요한 태그를 모두 조회
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