Created
October 30, 2009 22:04
-
-
Save kevinclark/222768 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment