From 0fcd72519219d5a2aa41a6b17c5dcfbc534da7e7 Mon Sep 17 00:00:00 2001 From: Marco Lents Date: Mon, 17 Nov 2025 17:26:10 +0100 Subject: [PATCH] add job --- crawler.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crawler.py b/crawler.py index 5b70260..6dc9e6a 100644 --- a/crawler.py +++ b/crawler.py @@ -21,6 +21,7 @@ class Biography: self, name, party, + job, cv, speeches, votes, @@ -31,6 +32,7 @@ class Biography: ): self.name = name self.party = party + self.job = job self.cv = cv self.speeches = speeches self.votes = votes @@ -74,6 +76,8 @@ Name: {self.name[1]} {self.name[0]} Partei: {self.party} +Beruf: {self.job} + Biographie: {self.cv} # Reden {speeches_str} @@ -229,6 +233,7 @@ def get_bio(url, name, sleep_for): print(f"Getting {url} for {name[1]} {name[0]}") response = request_handle_rate_limit(url) soup = BeautifulSoup(response.content) + job = soup.find(class_="m-biography__introInfo").find("span").text cv = soup.find(class_="m-biography__biography").text.strip() ajax_divs = soup.find_all(class_="m-ajaxLoadedContent") speech_div = None @@ -260,6 +265,7 @@ def get_bio(url, name, sleep_for): bio = Biography( name, party, + job, cv, speeches, votes,