Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class AbstractScraper
- def initialize
- @agent = WWW::Mechanize.new
- @agent.user_agent_alias = "Windows Mozilla"
- @agent.keep_alive = false
- end
- end
- class AuthenticatedScraper < AbstractScraper
- def initialize(username, password)
- super()
- login(username, password)
- end
- end
- class NormalAScraper < AbstractScraper; end
- class NormalBScraper < AbstractScraper; end
- class GoofyScraper < AuthenticatedScraper
- def initialize
- super()
- login # apparently login takes *args?
- end
- end
Add Comment
Please, Sign In to add comment