728x90
import requests
from bs4 import BeautifulSoup
LIMIT = 50
INDEED_URL = "http://www.indeed.com/jobs?q=python&limit={LIMIT}"
def extract_indeed_pages():
result = requests.get(INDEED_URL)
soup = BeautifulSoup(result.text, "html.parser")
pagination = soup.find("div", {"class":"pagination"})
links = pagination.find_all('a')
pages = []
for link in links[:-1]:
pages.append(int(link.string))
max_page = pages[-1]
return max_page
728x90
'호그와트' 카테고리의 다른 글
extract company (0) | 2022.02.24 |
---|---|
extract title jobs (0) | 2022.02.24 |
Dreamhack web PATCH-1 (0) | 2022.02.21 |
User After free 취약점 (0) | 2022.02.19 |
dreamhack rev-basic-9 (0) | 2022.02.14 |