url = 'https://realpython.github.io/fake-jobs/' response = requests.get(url) data = BeautifulSoup(response.content, 'html.parser') result = data.find(id='ResultsContainer') cards = data.find_all('div', class_='card-content') for item in cards: title = item.find('h2', class_='title') company = item.find('h3', class_='company') location = item.find('p', class_='location') print(title.text.strip(), ' | ', company.text.strip(), ' | ', location.text.strip()) import requests from bs4 import BeautifulSoup url = 'https://realpython.github.io/fake-jobs/' response = requests.get(url) data = BeautifulSoup(response.content, 'html.parser') result = data.find(id='ResultsContainer') python = result.find_all( 'h2', string=lambda text: 'python' in text.lower() ) cards = [item.parent.parent.parent for item in python] ''' cards = [] for item in python: cards.append(item.parent.parent.parent) ''' for item in cards: links = item.find_all('a', string=lambda s: "Apply" == s) print(links[0]['href'])