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 ID scraper #325

Merged
merged 9 commits into from
Jan 27, 2022
Merged

Add ID scraper #325

merged 9 commits into from
Jan 27, 2022

Conversation

chriszs
Copy link
Contributor

@chriszs chriszs commented Jan 20, 2022

Add Idaho scraper.

Steps to test

python -m warn.cli ID

Closes #82

@chriszs
Copy link
Contributor Author

chriszs commented Jan 22, 2022

Deals with gaps caused by merged cells, like this:

Screen Shot 2022-01-20 at 6 58 52 AM

By filling down like this:

Screen Shot 2022-01-21 at 7 57 20 PM

Notice we're excluding the number of employees column to preserve the merged cell total and avoid double counting.

@chriszs chriszs marked this pull request as ready for review January 22, 2022 00:59
warn/scrapers/id.py Outdated Show resolved Hide resolved
@chriszs chriszs changed the title feat(id): add scraper (WIP) feat(id): add scraper Jan 22, 2022
@chriszs chriszs changed the title feat(id): add scraper Add ID scraper Jan 22, 2022
@chriszs
Copy link
Contributor Author

chriszs commented Jan 24, 2022

This one's ready for review, @palewire.

@chriszs chriszs force-pushed the id-gh-82-add-scraper branch from d9dff16 to 5627f79 Compare January 24, 2022 03:48
@chriszs chriszs force-pushed the id-gh-82-add-scraper branch from 18a2e0e to 4ef09ae Compare January 24, 2022 04:19
Copy link
Contributor

@palewire palewire left a comment

Choose a reason for hiding this comment

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

Thanks for the creative use of pdfplumber here. Big picture it all looks great. I just have a couple small things I've flagged. Let me know what you think.

warn/scrapers/id.py Outdated Show resolved Hide resolved
warn/scrapers/id.py Outdated Show resolved Hide resolved
warn/scrapers/id.py Outdated Show resolved Hide resolved
warn/scrapers/id.py Outdated Show resolved Hide resolved
warn/scrapers/id.py Outdated Show resolved Hide resolved
warn/scrapers/id.py Outdated Show resolved Hide resolved
@chriszs chriszs force-pushed the id-gh-82-add-scraper branch from b0379b8 to 2c1b0f3 Compare January 27, 2022 17:09
@chriszs
Copy link
Contributor Author

chriszs commented Jan 27, 2022

Thanks for the suggestions! Refactored to use cache.download (and added a feature to that to pass verify or any other kwarg), added some util functions to make that one if statement test read clearer, integrated your suggestions and cleaned everything up.

@chriszs chriszs requested a review from palewire January 27, 2022 17:16
@palewire palewire merged commit ff231bd into biglocalnews:main Jan 27, 2022
@palewire
Copy link
Contributor

Thanks! You're in!

@chriszs chriszs deleted the id-gh-82-add-scraper branch January 27, 2022 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ID scrape
2 participants