Make thehexfiles.net accept www.thehexfiles.net too.

This commit is contained in:
Jim Miller 2012-05-30 16:47:56 -05:00
parent 5d4c8bc44b
commit 07e9b6da81

View file

@ -69,13 +69,15 @@ class TheHexFilesNetAdapter(BaseSiteAdapter):
# The site domain. Does have www here, if it uses it.
return 'thehexfiles.net'
@classmethod
def getAcceptDomains(cls):
return ['www.thehexfiles.net','thehexfiles.net']
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+$"
## Getting the chapter list and the meta data, plus 'is adult' checking.
def extractChapterUrlsAndMetadata(self):
@ -196,4 +198,4 @@ class TheHexFilesNetAdapter(BaseSiteAdapter):
if None == soup:
raise exceptions.FailedToDownload("Error downloading Chapter: %s! Missing required element!" % url)
return self.utf8FromSoup(url,soup)
return self.utf8FromSoup(url,soup)