Skip to content

Commit

Permalink
fixup! fixup! Switch to different way of parsing, want them outside s…
Browse files Browse the repository at this point in the history
…peeches. Add TWFY bit
  • Loading branch information
ajparsons committed Apr 24, 2024
1 parent 01bc06b commit 762a000
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pyscraper/sp_2024/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,11 @@ def process_raw_html(raw_html: Tag, agenda_item_url: str) -> BeautifulSoup:
speaker.append(next_sibling)
next_sibling = speaker.find_next_sibling()

# there are currently timestamps inside speeches - we want to move these after their parent
for timestamp in soup.find_all("timestamp"):
# there are currently timestamps inside speeches
# we want to move these after their parent
# move these in reverse so that consequentive timestamps
# end up in the right order
for timestamp in soup.find_all("timestamp")[::-1]:
timestamp.parent.insert_after(timestamp)

# now, in each speech - we want to iterate through and check for a p tag that's just 'For' or 'Against'
Expand Down

0 comments on commit 762a000

Please sign in to comment.