Skip to content
Discussion options

You must be logged in to vote

Most states don't offer any way to tell what items have been updated or sort by date, so there's no way to just scrape the new things. If you happen to be scraping federal data, you can add start=YYYY-mm-dd to your scrape command to filter by date.

If you're running the full openstates stack with the database you can do a scrape, import it, then query the db by update date.

If you're doing a scrape to local files (--scrape option) then I'd recommend saving an md5 hash of the files on your last scrape to something like redis and checking against that.

Just scraping new items is something that seems like it should be an easy problem -- but states often don't flag metadata updates like title…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by showerst
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants