Debug für jsons gelöscht, 1Liner: wie viele Direct Reports wurden gefunden hinzugefügt.

This commit is contained in:
2026-02-02 13:07:11 +01:00
parent 8040ab5fef
commit 642117aae8
2 changed files with 3 additions and 4 deletions

1
.gitignore vendored
View File

@@ -174,3 +174,4 @@ cython_debug/
# PyPI configuration file # PyPI configuration file
.pypirc .pypirc
auth_state.json

View File

@@ -87,18 +87,16 @@ async def extract_relations_for_manager(manager_email: str) -> List[WorkingWithR
working_json = collected.get("workingwith") or {} working_json = collected.get("workingwith") or {}
manager_person = parse_person_from_organization_person(person_json) manager_person = parse_person_from_organization_person(person_json)
print(manager_person)
working_with_persons = parse_workingwith_entries(working_json) working_with_persons = parse_workingwith_entries(working_json)
print(working_with_persons)
directs_emails = parse_direct_emails_from_organization(org_json) directs_emails = parse_direct_emails_from_organization(org_json)
print(directs_emails)
relations: List[WorkingWithRelation] = [] relations: List[WorkingWithRelation] = []
# Manager -> WorkingWith # Manager -> WorkingWith
for dest in working_with_persons: for dest in working_with_persons:
relations.append(WorkingWithRelation(source=manager_person, destination=dest)) relations.append(WorkingWithRelation(source=manager_person, destination=dest))
print("Found directs: ", len(directs_emails))
# Für alle Directs ebenfalls WorkingWith holen # Für alle Directs ebenfalls WorkingWith holen
for direct_email in directs_emails: for direct_email in directs_emails:
collected_direct = await _open_profile_and_collect(page, direct_email) collected_direct = await _open_profile_and_collect(page, direct_email)