Skip to content

Commit

Permalink
Updated formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
samJMA committed Nov 6, 2024
1 parent 1bd0cde commit 0b49b23
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ca_qc_kirkland/people.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ def decode_email(e):
de += chr(int(e[i : i + 2], 16) ^ k)

return de

page = self.lxmlize(COUNCIL_PAGE, "iso-8859-1")

councillors = page.xpath('//table/tbody[not(@id)]/tr/td[@valign="top"]')
Expand Down Expand Up @@ -43,7 +44,7 @@ def decode_email(e):
email = decode_email(encrypted_email)

# cloudflare encrypts the email data
email = councillor.xpath('.//div/*/*/@href | .//div/*/@href | .//@href')[0]
email = councillor.xpath(".//div/*/*/@href | .//div/*/@href | .//@href")[0]
decoded_email = decode_email(email.split("#", 1)[1])
p = Person(primary_org="legislature", name=name, district=district, role=role)
p.add_source(COUNCIL_PAGE)
Expand Down

0 comments on commit 0b49b23

Please sign in to comment.