From be3b08116cb093bd46d0ce3be9bf177b25cb85a7 Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Tue, 6 Mar 2012 16:56:34 -0600 Subject: [PATCH] Allow but not require www. on thequidditchpitch.org. --- fanficdownloader/adapters/adapter_thequidditchpitchorg.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fanficdownloader/adapters/adapter_thequidditchpitchorg.py b/fanficdownloader/adapters/adapter_thequidditchpitchorg.py index 1662ba9..0cf66c0 100644 --- a/fanficdownloader/adapters/adapter_thequidditchpitchorg.py +++ b/fanficdownloader/adapters/adapter_thequidditchpitchorg.py @@ -74,11 +74,15 @@ class TheQuidditchPitchOrgAdapter(BaseSiteAdapter): # XXX # The site domain. Does have www here, if it uses it. return 'thequidditchpitch.org' # XXX + @classmethod + def getAcceptDomains(cls): + return ['www.thequidditchpitch.org','thequidditchpitch.org'] + def getSiteExampleURLs(self): return "http://"+self.getSiteDomain()+"/viewstory.php?sid=1234" def getSiteURLPattern(self): - return re.escape("http://"+self.getSiteDomain()+"/viewstory.php?sid=")+r"\d+$" + return re.escape("http://")+"(www\.)?"+re.escape(self.getSiteDomain()+"/viewstory.php?sid=")+r"\d+$" ## Login seems to be reasonably standard across eFiction sites. def needToLoginCheck(self, data):