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
def extract_indeed_jobs(last_page):
jobs = []
result = requests.get(INDEED_URL)
soup = BeautifulSoup(result.text, "html.parser")
results = soup.find("div", {"class":"jobsearch-SerpJobCard"})
for result in results:
title = result.find("div", {"class":"title"})
print(title)
return jobs
728x90
'호그와트' 카테고리의 다른 글
Dreamhack login-1 (0) | 2022.02.24 |
---|---|
extract company (0) | 2022.02.24 |
extract last page (0) | 2022.02.24 |
Dreamhack web PATCH-1 (0) | 2022.02.21 |
User After free 취약점 (0) | 2022.02.19 |