add job
This commit is contained in:
parent
3787f756f3
commit
0fcd725192
1 changed files with 6 additions and 0 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue