mirror of
https://github.com/Hestia-Homes/survey-extraction.git
synced 2026-06-08 11:17:29 +00:00
more robost
This commit is contained in:
parent
413538ac3c
commit
c40c991320
1 changed files with 6 additions and 2 deletions
|
|
@ -72,7 +72,11 @@ for pipeline in pipelines.results:
|
|||
week_label = get_week_label(note["created_at"])
|
||||
if not week_label:
|
||||
continue
|
||||
html_body = note['note']
|
||||
html_body = note.get('note')
|
||||
if not html_body:
|
||||
print(f"Skipping note with missing 'note' field: {note}")
|
||||
continue
|
||||
|
||||
print(f"Debugging purposes html_body looks like {html_body}")
|
||||
soup = BeautifulSoup(html_body, "html.parser")
|
||||
plain_text = soup.get_text(separator="\n")
|
||||
|
|
@ -92,7 +96,7 @@ for pipeline in pipelines.results:
|
|||
|
||||
notes_data[pipeline_name].append({
|
||||
"Deal Name": deal_name.upper(),
|
||||
"Deal URL": f"https://app-eu1.hubspot.com/contacts/{portal_id}/record/0-3/{deals["deal_id"]}/",
|
||||
"Deal URL": f"https://app-eu1.hubspot.com/contacts/{portal_id}/record/0-3/{deals['deal_id']}/",
|
||||
"Deal Owner": owner_name,
|
||||
"Deal Stage": stage.label.upper(),
|
||||
"Value": deals["value"],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue