Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add in Nunavut scraper #330

Merged
merged 4 commits into from
Apr 29, 2024

Conversation

seamuslee001
Copy link
Contributor

This is dependent on opencivicdata/ocd-division-ids#374

division_name = "Nunavut"
name = "Nunavut Legislative Assembly"
url = "https://www.assembly.nu.ca"
parties = []
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
parties = []

ca_nu/people.py Outdated
members = page.xpath('//*[@id="content"]/section/div/div[3]/div/div[2]/div')
assert len(members), "No members found"
for member in members:
if "Vacant" not in member.xpath("./span[2]")[0].text_content():
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To reduce indentation prefer this style:

            if "Vacant" in member.xpath("./span[2]")[0].text_content():
                continue

            ...

@seamuslee001
Copy link
Contributor Author

@jpmckinney thanks James, I have updated this now

@jpmckinney jpmckinney merged commit f5f2cf1 into opencivicdata:master Apr 29, 2024
1 check passed
@jpmckinney
Copy link
Member

FYI, this can't be imported into Represent until you find a shapefile (or other GIS file) for their constituencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants