Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
bzhangjma committed Oct 30, 2024
1 parent a370b4c commit e21d8eb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ca_bc_victoria/people.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ def scrape(self):
'//ul[@class="menu menu--level-0"]//a[contains(., "Mayor") and not(contains(., "Council"))]/@href'
)[0]
page = self.lxmlize(mayor_url)
role, name = page.xpath("//h1/span")[0].text_content().split(" ", 1)
role = "Mayor"
role, name = page.xpath(
'//ul[@class="menu menu--level-0"]//a[contains(., "Mayor") and not(contains(., "Council"))]/text()'
)[0].split(" ", 1)
photo = councillor.xpath('//div[@class="field__item"]/img/@src')[0]
email = self.get_email(page)
phone = self.get_phone(page)
Expand Down

0 comments on commit e21d8eb

Please sign in to comment.