I am trying to create a Web Scraping script that allows me to scrape data of a website based on keywords. So if the keyword occurs on the Website it should return the entire paragraph (or better the entire job listing with descriptions). However, my Code atm only returns the actual keyword I was searching for instead of the entire paragraph the keyword is in. Here is my Code:
import requests
from bs4 import BeautifulSoup as Bsoup
keywords = ["KI", "AI", "Big Data", "Data", "data", "big data", "Analytics", "analytics", "digitalisierung", "ML",
"Machine Learning", "Baumeisterarbeiten"]
headers = {''}
url = "https://www.auftrag.at//tenders.aspx"
data = requests.get(url, headers=headers, timeout=5)
soup = Bsoup(data.text, 'html.parser')
# jobs = soup.find_all('div', {'class': 'article'})
jobs = soup.find_all(string=["KI", "AI", "Big Data", "Data", "data", "big data", "Analytics", "analytics", "digitalisierung", "ML",
"Machine Learning"])
print(jobs)
for word in jobs:
print(word)