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

[WIP] Prototype of Everypolitician::Scraper class #8

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

chrismytton
Copy link
Collaborator

⚠️ Not ready for merging.

This is a prototype of the Everypolitician::Scraper class. It's a subset of the original change made in #7

Notable differences from #7 are:

  • This pull request doesn't include the ScraperRun class
  • Scraper specific config, such as urls, now goes into a :config option
  • The Scraper class is now responsible for handling index_fields, since it needs the data to calculate this anyway.
  • This doesn't try and do anything clever with the storage (ScraperWiki), I think that will probably need to be done in a separate change.

The moves the steps that are needed to actually get the data out of the
scraper into a separate class, which can then be called when inserting
into the storage.
Rather than hard coding the data pass it into the constructor.
We don't want to have to run the scraper repeatedly to do calculations
on the results, so cache the result.
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.

1 participant