Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests
- from bs4 import BeautifulSoup
- def extract(page):
- headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.60 Safari/537.36'}
- url = f'https://be.indeed.com/jobs?q=data%20scientist&l=belgium&start={page}&vjk=66fcf0e037064cf5'
- r = requests.get(url,headers, verify= False)
- soup = BeautifulSoup(r.content, 'html.parser')
- return soup
- def transform(soup):
- divs = soup.find_ll('div', class_ ='mosaic-zone')
- return len(divs)
- c= extract(0)
- print(transform(c))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement