Open chrismytton opened 7 years ago
"we've seen problems with people"
People called @davewhiteland :-|
Heh, I've definitely caught @chrismytton doing it as well 😉
Note: This might well end up becoming part of the Everypolitician::Scraper
class (which only exists in prototype form currently) once https://github.com/everypolitician/everypolitician/issues/572#issuecomment-279790931 is done.
Problem
Currently, the following boilerplate is needed to use a
Scraped::Document
subclass:This is a bit long-winded and we've seen problems with people accidentally forgetting to call
Scraped::Request#response
, for example.Proposed solution
Add a shortcut method to make this less error-prone and less verbose. There's an example of a top-level
scrape
method in the russia-duma-2016 scraper. It would be good to make this available as a method on theScraped
module.